You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/05/16 15:52:07 UTC
svn commit: r406944 [21/30] - in
/incubator/harmony/enhanced/classlib/trunk/modules/rmi2: ./ build/ doc/
doc/testing/ doc/testing/rmi http tunneling/ doc/testing/rmi http
tunneling/Results - ITC/ doc/testing/rmi http tunneling/Results - SUN/
doc/testin...
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroupDesc.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroupDescCommandEnvironment.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroupDescCommandEnvironment.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroupDescCommandEnvironment.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroupDescCommandEnvironment.java Tue May 16 06:51:00 2006
@@ -0,0 +1,1151 @@
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.activation;
+
+import java.rmi.activation.ActivationGroupDesc;
+
+import ar.org.fitc.test.util.Messages;
+
+import junit.framework.TestCase;
+
+public class TestActivationGroupDescCommandEnvironment extends TestCase
+ implements Messages {
+ int hc = 0;
+
+ public void testActivationGroupDescCommandEnvironment001() {
+
+ assertNotNull(msgNotNull, new ActivationGroupDesc.CommandEnvironment(
+ "", new String[0]));
+
+ }
+
+ public void testActivationGroupDescCommandEnvironment002() {
+
+ assertNotNull(msgNotNull, new ActivationGroupDesc.CommandEnvironment(
+ "", new String[] { "Hi", "Ha", "Hu" }));
+
+ }
+
+ public void testActivationGroupDescCommandEnvironment003() {
+
+ assertNotNull(msgNotNull, new ActivationGroupDesc.CommandEnvironment(
+ "", null));
+
+ }
+
+ public void testActivationGroupDescCommandEnvironment004() {
+
+ assertNotNull(msgNotNull, new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[0]));
+
+ }
+
+ public void testActivationGroupDescCommandEnvironment005() {
+
+ assertNotNull(msgNotNull, new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[] { "Hi", "Ha", "Hu" }));
+
+ }
+
+ public void testActivationGroupDescCommandEnvironment006() {
+
+ assertNotNull(msgNotNull, new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", null));
+
+ }
+
+ public void testActivationGroupDescCommandEnvironment007() {
+
+ assertNotNull(msgNotNull, new ActivationGroupDesc.CommandEnvironment(
+ null, new String[0]));
+
+ }
+
+ public void testActivationGroupDescCommandEnvironment008() {
+
+ assertNotNull(msgNotNull, new ActivationGroupDesc.CommandEnvironment(
+ null, new String[] { "Hi", "Ha", "Hu" }));
+
+ }
+
+ public void testActivationGroupDescCommandEnvironment009() {
+
+ assertNotNull(msgNotNull, new ActivationGroupDesc.CommandEnvironment(
+ null, null));
+
+ }
+
+ public void testGetCommandOptions001() {
+
+ String[] s = new String[0];
+ String[] argv = (new ActivationGroupDesc.CommandEnvironment("",
+ new String[0])).getCommandOptions();
+ for (int i = 0; i < s.length; i++) {
+ assertEquals("Point to point the command may be equals", s[i],
+ argv[i]);
+ }
+
+ }
+
+ public void testGetCommandOptions002() {
+
+ String[] s = new String[] { "Hi", "Ha", "Hu" };
+ String[] argv = (new ActivationGroupDesc.CommandEnvironment("",
+ new String[] { "Hi", "Ha", "Hu" })).getCommandOptions();
+ for (int i = 0; i < s.length; i++) {
+ assertEquals("Point to point the command may be equals", s[i],
+ argv[i]);
+ }
+
+ }
+
+ public void testGetCommandOptions003() {
+
+ assertNotNull("Null is give, but not resive",
+ (new ActivationGroupDesc.CommandEnvironment("", null))
+ .getCommandOptions());
+
+ }
+
+ public void testGetCommandOptions004() {
+
+ String[] s = new String[0];
+ String[] argv = (new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0])).getCommandOptions();
+ for (int i = 0; i < s.length; i++) {
+ assertEquals("Point to point the command may be equals", s[i],
+ argv[i]);
+ }
+
+ }
+
+ public void testGetCommandOptions005() {
+
+ String[] s = new String[] { "Hi", "Ha", "Hu" };
+ String[] argv = (new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" })).getCommandOptions();
+ for (int i = 0; i < s.length; i++) {
+ assertEquals("Point to point the command may be equals", s[i],
+ argv[i]);
+ }
+
+ }
+
+ public void testGetCommandOptions006() {
+
+ assertNotNull("Null is given, but not recived",
+ (new ActivationGroupDesc.CommandEnvironment("Hola la", null))
+ .getCommandOptions());
+
+ }
+
+ public void testGetCommandOptions007() {
+
+ String[] s = new String[0];
+ String[] argv = (new ActivationGroupDesc.CommandEnvironment(null,
+ new String[0])).getCommandOptions();
+ for (int i = 0; i < s.length; i++) {
+ assertEquals("Point to point the command may be equals", s[i],
+ argv[i]);
+ }
+
+ }
+
+ public void testGetCommandOptions008() {
+
+ String[] s = new String[] { "Hi", "Ha", "Hu" };
+ String[] argv = (new ActivationGroupDesc.CommandEnvironment(null,
+ new String[] { "Hi", "Ha", "Hu" })).getCommandOptions();
+ for (int i = 0; i < s.length; i++) {
+ assertEquals("Point to point the command may be equals", s[i],
+ argv[i]);
+ }
+
+ }
+
+ public void testGetCommandOptions009() {
+
+ assertNotNull("Null is given, but not recived",
+ (new ActivationGroupDesc.CommandEnvironment(null, null))
+ .getCommandOptions());
+
+ }
+
+ public void testGetCommandPath001() {
+
+ String s = "";
+ String path = (new ActivationGroupDesc.CommandEnvironment("",
+ new String[0])).getCommandPath();
+ assertEquals("Path is initial path", s, path);
+
+ }
+
+ public void testGetCommandPath002() {
+
+ String s = "";
+ String path = (new ActivationGroupDesc.CommandEnvironment("",
+ new String[] { "Hi", "Ha", "Hu" })).getCommandPath();
+ assertEquals("Path is initial path", s, path);
+
+ }
+
+ public void testGetCommandPath003() {
+
+ String s = "";
+ String path = (new ActivationGroupDesc.CommandEnvironment("", null))
+ .getCommandPath();
+ assertEquals("Path is initial path", s, path);
+
+ }
+
+ public void testGetCommandPath004() {
+
+ String s = "Hola la";
+ String path = (new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0])).getCommandPath();
+ assertEquals("Path is initial path", s, path);
+
+ }
+
+ public void testGetCommandPath005() {
+
+ String s = "Hola la";
+ String path = (new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" })).getCommandPath();
+ assertEquals("Path is initial path", s, path);
+
+ }
+
+ public void testGetCommandPath006() {
+
+ String s = "Hola la";
+ String path = (new ActivationGroupDesc.CommandEnvironment("Hola la",
+ null)).getCommandPath();
+ assertEquals("Path is initial path", s, path);
+
+ }
+
+ public void testGetCommandPath007() {
+
+ String s = null;
+ String path = (new ActivationGroupDesc.CommandEnvironment(null,
+ new String[0])).getCommandPath();
+ assertEquals("Path is initial path", s, path);
+
+ }
+
+ public void testGetCommandPath008() {
+
+ String s = null;
+ String path = (new ActivationGroupDesc.CommandEnvironment(null,
+ new String[] { "Hi", "Ha", "Hu" })).getCommandPath();
+ assertEquals("Path is initial path", s, path);
+
+ }
+
+ public void testGetCommandPath009() {
+
+ String s = null;
+ String path = (new ActivationGroupDesc.CommandEnvironment(null, null))
+ .getCommandPath();
+ assertEquals("Path is initial path", s, path);
+
+ }
+
+ /*
+ * Test method for 'java.rmi.activation.ActivationGroupID.equals(Object)'
+ */
+ public void testEquals001() {
+
+ assertEquals("two CommandEnvironmet are equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[0]),
+ new ActivationGroupDesc.CommandEnvironment("", new String[0]));
+
+ }
+
+ public void testEquals002() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals003() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ null)));
+
+ }
+
+ public void testEquals004() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[0])));
+
+ }
+
+ public void testEquals005() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals006() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", null)));
+
+ }
+
+ public void testEquals007() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[0])));
+
+ }
+
+ public void testEquals008() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals009() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, null)));
+
+ }
+
+ public void testEquals010() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[0])));
+
+ }
+
+ public void testEquals011() {
+
+ assertEquals("two CommandEnvironmet are equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[] {
+ "Hi", "Ha", "Hu" }),
+ new ActivationGroupDesc.CommandEnvironment("", new String[] {
+ "Hi", "Ha", "Hu" }));
+
+ }
+
+ public void testEquals012() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ null)));
+
+ }
+
+ public void testEquals013() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[0])));
+
+ }
+
+ public void testEquals014() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals015() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", null)));
+
+ }
+
+ public void testEquals016() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[0])));
+
+ }
+
+ public void testEquals017() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals018() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, null)));
+
+ }
+
+ public void testEquals019() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[0])));
+
+ }
+
+ public void testEquals020() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals021() {
+
+ assertEquals("two CommandEnvironmet are equals",
+ new ActivationGroupDesc.CommandEnvironment("", null),
+ new ActivationGroupDesc.CommandEnvironment("", null));
+
+ }
+
+ public void testEquals022() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[0])));
+
+ }
+
+ public void testEquals023() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals024() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", null)));
+
+ }
+
+ public void testEquals025() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[0])));
+
+ }
+
+ public void testEquals026() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals027() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, null)));
+
+ }
+
+ public void testEquals028() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[0])));
+
+ }
+
+ public void testEquals029() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals030() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ null)));
+
+ }
+
+ public void testEquals031() {
+
+ assertEquals("two CommandEnvironmet are equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0]),
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0]));
+
+ }
+
+ public void testEquals032() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals033() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", null)));
+
+ }
+
+ public void testEquals034() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[0])));
+
+ }
+
+ public void testEquals035() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals036() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, null)));
+
+ }
+
+ public void testEquals037() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[0])));
+
+ }
+
+ public void testEquals038() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals039() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ null)));
+
+ }
+
+ public void testEquals040() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[0])));
+
+ }
+
+ public void testEquals041() {
+
+ assertEquals("two CommandEnvironmet are equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" }),
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" }));
+
+ }
+
+ public void testEquals042() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", null)));
+
+ }
+
+ public void testEquals043() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[0])));
+
+ }
+
+ public void testEquals044() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals045() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, null)));
+
+ }
+
+ public void testEquals046() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[0])));
+
+ }
+
+ public void testEquals047() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals048() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ null)));
+
+ }
+
+ public void testEquals049() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[0])));
+
+ }
+
+ public void testEquals050() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals051() {
+
+ assertEquals("two CommandEnvironmet are equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la", null),
+ new ActivationGroupDesc.CommandEnvironment("Hola la", null));
+
+ }
+
+ public void testEquals052() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[0])));
+
+ }
+
+ public void testEquals053() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals054() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment("Hola la", null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, null)));
+
+ }
+
+ public void testEquals055() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[0])));
+
+ }
+
+ public void testEquals056() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals057() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ null)));
+
+ }
+
+ public void testEquals058() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[0])));
+
+ }
+
+ public void testEquals059() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals060() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", null)));
+
+ }
+
+ public void testEquals061() {
+
+ assertEquals(
+ "two CommandEnvironmet are equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[0]),
+ new ActivationGroupDesc.CommandEnvironment(null, new String[0]));
+
+ }
+
+ public void testEquals062() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals063() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[0])
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, null)));
+
+ }
+
+ public void testEquals064() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[0])));
+
+ }
+
+ public void testEquals065() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals066() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ null)));
+
+ }
+
+ public void testEquals067() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[0])));
+
+ }
+
+ public void testEquals068() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals069() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", null)));
+
+ }
+
+ public void testEquals070() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[0])));
+
+ }
+
+ public void testEquals071() {
+
+ assertEquals("two CommandEnvironmet are equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[] {
+ "Hi", "Ha", "Hu" }),
+ new ActivationGroupDesc.CommandEnvironment(null, new String[] {
+ "Hi", "Ha", "Hu" }));
+
+ }
+
+ public void testEquals072() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, new String[] {
+ "Hi", "Ha", "Hu" })
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, null)));
+
+ }
+
+ public void testEquals073() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, null)
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[0])));
+
+ }
+
+ public void testEquals074() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, null)
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals075() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, null)
+ .equals(new ActivationGroupDesc.CommandEnvironment("",
+ null)));
+
+ }
+
+ public void testEquals076() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[0])));
+
+ }
+
+ public void testEquals077() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals078() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ "Hola la", null)));
+
+ }
+
+ public void testEquals079() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[0])));
+
+ }
+
+ public void testEquals080() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, null)
+ .equals(new ActivationGroupDesc.CommandEnvironment(
+ null, new String[] { "Hi", "Ha", "Hu" })));
+
+ }
+
+ public void testEquals081() {
+
+ assertEquals("two CommandEnvironmet are equals",
+ new ActivationGroupDesc.CommandEnvironment(null, null),
+ new ActivationGroupDesc.CommandEnvironment(null, null));
+
+ }
+
+ public void testEquals082() {
+
+ assertFalse("two CommandEnvironmet are not equals",
+ new ActivationGroupDesc.CommandEnvironment(null, null)
+ .equals(null));
+
+ }
+
+ public void testHashCode001() {
+
+ hc = new ActivationGroupDesc.CommandEnvironment("", new String[0])
+ .hashCode();
+ for (int i = 1; i < 10; i++) {
+ assertEquals("to CommandEnvironmet are equals", hc,
+ new ActivationGroupDesc.CommandEnvironment("",
+ new String[0]).hashCode());
+ }
+
+ }
+
+ public void testHashCode002() {
+
+ hc = new ActivationGroupDesc.CommandEnvironment("", new String[] {
+ "Hi", "Ha", "Hu" }).hashCode();
+ for (int i = 1; i < 10; i++) {
+ assertEquals("to CommandEnvironmet are equals", hc,
+ new ActivationGroupDesc.CommandEnvironment("",
+ new String[] { "Hi", "Ha", "Hu" }).hashCode());
+ }
+
+ }
+
+ public void testHashCode003() {
+
+ hc = new ActivationGroupDesc.CommandEnvironment("", null).hashCode();
+ for (int i = 1; i < 10; i++) {
+ assertEquals("to CommandEnvironmet are equals", hc,
+ new ActivationGroupDesc.CommandEnvironment("", null)
+ .hashCode());
+ }
+
+ }
+
+ public void testHashCode004() {
+
+ hc = new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0]).hashCode();
+ for (int i = 1; i < 10; i++) {
+ assertEquals("to CommandEnvironmet are equals", hc,
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[0]).hashCode());
+ }
+
+ }
+
+ public void testHashCode005() {
+
+ hc = new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" }).hashCode();
+ for (int i = 1; i < 10; i++) {
+ assertEquals("to CommandEnvironmet are equals", hc,
+ new ActivationGroupDesc.CommandEnvironment("Hola la",
+ new String[] { "Hi", "Ha", "Hu" }).hashCode());
+ }
+
+ }
+
+ public void testHashCode006() {
+
+ hc = new ActivationGroupDesc.CommandEnvironment("Hola la", null)
+ .hashCode();
+ for (int i = 1; i < 10; i++) {
+ assertEquals("to CommandEnvironmet are equals", hc,
+ new ActivationGroupDesc.CommandEnvironment("Hola la", null)
+ .hashCode());
+ }
+
+ }
+
+ public void testHashCode007() {
+
+ hc = new ActivationGroupDesc.CommandEnvironment(null, new String[0])
+ .hashCode();
+ for (int i = 1; i < 10; i++) {
+ assertEquals("to CommandEnvironmet are equals", hc,
+ new ActivationGroupDesc.CommandEnvironment(null,
+ new String[0]).hashCode());
+ }
+
+ }
+
+ public void testHashCode008() {
+
+ hc = new ActivationGroupDesc.CommandEnvironment(null, new String[] {
+ "Hi", "Ha", "Hu" }).hashCode();
+ for (int i = 1; i < 10; i++) {
+ assertEquals("to CommandEnvironmet are equals", hc,
+ new ActivationGroupDesc.CommandEnvironment(null,
+ new String[] { "Hi", "Ha", "Hu" }).hashCode());
+ }
+
+ }
+
+ public void testHashCode009() {
+
+ hc = new ActivationGroupDesc.CommandEnvironment(null, null).hashCode();
+ for (int i = 1; i < 10; i++) {
+ assertEquals("to CommandEnvironmet are equals", hc,
+ new ActivationGroupDesc.CommandEnvironment(null, null)
+ .hashCode());
+ }
+
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroupDescCommandEnvironment.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroupID.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroupID.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroupID.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroupID.java Tue May 16 06:51:00 2006
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.activation;
+
+import java.rmi.activation.ActivationGroupID;
+import ar.org.fitc.test.util.Messages;
+import junit.framework.TestCase;
+
+public class TestActivationGroupID extends TestCase implements Messages {
+
+
+ public static void main(String[] args) {
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /*
+ * Test method for 'java.rmi.activation.ActivationGroupID.ActivationGroupID(ActivationSystem)'
+ */
+ public void testActivationGroupID001() {
+
+ assertNotNull(msgNotNull, new ActivationGroupID(null));
+
+ }
+
+ /*
+ * Test method for 'java.rmi.activation.ActivationGroupID.hashCode()'
+ */
+ public void testHashCode001() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+ ActivationGroupID at2 = new ActivationGroupID(null);
+ assertNotSame("must not be equals", at.hashCode(), at2.hashCode());
+
+ }
+
+ public void testHashCode002() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+
+ int hc = at.hashCode();
+ for (int i = 1; i < 15; i++) {
+ assertEquals("must be equals", at.hashCode(), hc);
+ }
+
+ }
+
+ /*
+ * Test method for 'java.rmi.activation.ActivationGroupID.equals(Object)'
+ */
+ public void testEquals001() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+
+ assertTrue("must be equals", at.equals(at));
+
+ }
+
+ public void testEquals002() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+
+ assertFalse("mustn't be equals", at.equals(null));
+
+ }
+
+ public void testEquals003() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+
+ assertFalse("mustn't be equals", at.equals(new ActivationGroupID(null)));
+
+ }
+
+ public void testEquals004() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+ ActivationGroupID at2 = new ActivationGroupID(null);
+ assertEquals("must be equals", at2.equals(at), at.equals(at2));
+
+ }
+
+ public void testEquals005() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+
+ Object o = new Object();
+ assertFalse("must not be equals", at.equals(o));
+
+ }
+
+ public void testEquals006() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+
+ assertFalse("must not be equals", at.equals(null));
+
+ }
+
+ public void testEquals007() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+
+ for (int i = 1; i < 10; i++) {
+ assertTrue("must be equals", at.equals(at));
+ }
+
+ }
+
+ public void testEquals008() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+
+ for (int i = 1; i < 10; i++) {
+ assertFalse("mustn't be equals", at.equals(null));
+ }
+
+ }
+
+ public void testEquals009() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+
+ for (int i = 1; i < 10; i++) {
+ assertFalse("mustn't be equals", at.equals(new ActivationGroupID(
+ null)));
+ }
+
+ }
+
+ public void testEquals010() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+ ActivationGroupID at2 = new ActivationGroupID(null);
+ for (int i = 1; i < 10; i++) {
+ assertEquals("must be equals", at2.equals(at), at.equals(at2));
+ }
+
+ }
+
+ public void testEquals011() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+ Object o = new Object();
+ for (int i = 1; i < 10; i++) {
+ assertFalse("must not be equals", at.equals(o));
+ }
+
+ }
+
+ public void testEquals012() {
+
+ ActivationGroupID at = new ActivationGroupID(null);
+
+ for (int i = 1; i < 10; i++) {
+ assertFalse("must not be equals", at.equals(null));
+ }
+
+ }
+
+ /*
+ * Test method for 'java.rmi.activation.ActivationGroupID.getSystem()'
+ */
+ public void testGetSystem001() {
+
+ assertNull(new ActivationGroupID(null).getSystem());
+
+ }
+
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroupID.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroup_Stub.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroup_Stub.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroup_Stub.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroup_Stub.java Tue May 16 06:51:00 2006
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.activation;
+
+import java.rmi.MarshalledObject;
+import java.rmi.activation.ActivationDesc;
+import java.rmi.activation.ActivationException;
+import java.rmi.activation.ActivationGroup_Stub;
+import java.rmi.activation.ActivationID;
+import java.rmi.server.RemoteRef;
+
+import junit.framework.TestCase;
+import ar.org.fitc.test.util.Messages;
+
+public class TestActivationGroup_Stub extends TestCase implements Messages {
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(TestActivationGroup_Stub.class);
+ }
+
+ public TestActivationGroup_Stub(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /*
+ * Test method for
+ * 'java.rmi.activation.ActivationGroup_Stub.ActivationGroup_Stub(RemoteRef)'
+ */
+ /**
+ * This method test that for a <b>ActivationGroup_Stub(RemoteRef ref)</b>
+ * should not return null when a null is passed as parameter
+ */
+ public void testActivationGroup_Stub001() {
+ assertNotNull(new ActivationGroup_Stub(null));
+ }
+
+ /**
+ * This method test that for a <b>ActivationGroup_Stub(RemoteRef ref)</b>
+ * should not return null when a RemoteRef whose value is null is passed as
+ * parameter
+ */
+ public void testActivationGroup_Stub002() {
+ RemoteRef rr = null;
+ assertNotNull(new ActivationGroup_Stub(rr));
+ }
+
+ /*
+ * Test method for
+ * 'java.rmi.activation.ActivationGroup_Stub.newInstance(ActivationID,
+ * ActivationDesc)'
+ */
+
+ public void testNewInstance001() {
+ ActivationGroup_Stub ag = new ActivationGroup_Stub(null);
+ try {
+ ag.newInstance(new ActivationID(null), new ActivationDesc(
+ "myClass", "myLocation", new MarshalledObject(null)));
+ } catch (ActivationException e) {
+ } catch (Throwable e) {
+ fail(msgNoException + e);
+ }
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationGroup_Stub.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationID.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationID.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationID.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationID.java Tue May 16 06:51:00 2006
@@ -0,0 +1,298 @@
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.activation;
+
+import java.rmi.RemoteException;
+import java.rmi.activation.ActivationException;
+import java.rmi.activation.ActivationID;
+import java.rmi.activation.UnknownObjectException;
+
+import junit.framework.TestCase;
+import ar.org.fitc.test.rmi.object2test.MyActivator;
+import ar.org.fitc.test.util.Messages;
+
+public class TestActivationID extends TestCase implements Messages {
+
+ private MyActivator ac = null;
+
+ private ActivationID at;
+
+ public static void main(String[] args) {
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ ac = new MyActivator();
+ at = new ActivationID(ac);
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /*
+ * Test method for 'java.rmi.activation.ActivationID.ActivationID(Activator)'
+ */
+ public void testActivationID001() {
+
+ assertNotNull(msgNotNull, new ActivationID(ac));
+
+ }
+
+ public void testActivationID002() {
+
+ assertNotNull(msgNotNull, new ActivationID(null));
+
+ }
+
+ /*
+ * Test method for 'java.rmi.activation.ActivationID.equals(Object)'
+ */
+ public void testEquals001() {
+ assertTrue("must be equals", at.equals(at));
+
+ }
+
+ public void testEquals002() {
+ assertFalse("mustn't be equals", at.equals(null));
+ }
+
+ public void testEquals003() {
+ assertFalse("mustn't be equals", at.equals(new ActivationID(ac)));
+ }
+
+ public void testEquals004() {
+ ActivationID at2 = new ActivationID(ac);
+ assertEquals("must be equals", at2.equals(at), at.equals(at2));
+
+ }
+
+ public void testEquals005() {
+ Object o = new Object();
+ assertFalse("must not be equals", at.equals(o));
+ }
+
+ public void testEquals006() {
+ assertFalse("must not be equals", at.equals(null));
+ }
+
+ public void testEquals007() {
+ for (int i = 1; i < 10; i++) {
+ assertTrue("must be equals", at.equals(at));
+ }
+ }
+
+ public void testEquals008() {
+ for (int i = 1; i < 10; i++) {
+ assertFalse("mustn't be equals", at.equals(null));
+ }
+ }
+
+ public void testEquals009() {
+ for (int i = 1; i < 10; i++) {
+ assertFalse("mustn't be equals", at.equals(new ActivationID(ac)));
+ }
+ }
+
+ public void testEquals010() {
+ ActivationID at2 = new ActivationID(ac);
+ for (int i = 1; i < 10; i++) {
+ assertEquals("must be equals", at2.equals(at), at.equals(at2));
+ }
+
+ }
+
+ public void testEquals011() {
+
+ Object o = new Object();
+ for (int i = 1; i < 10; i++) {
+ assertFalse("must not be equals", at.equals(o));
+ }
+
+ }
+
+ public void testEquals012() {
+
+ for (int i = 1; i < 10; i++) {
+ assertFalse("must not be equals", at.equals(null));
+ }
+
+ }
+
+ /*
+ * Test method for 'java.rmi.activation.ActivationID.hashCode()'
+ */
+ public void testHashCode001() {
+ ActivationID at2 = new ActivationID(ac);
+ assertNotSame("must not be equals", at.hashCode(), at2.hashCode());
+ }
+
+ public void testHashCode002() {
+ int hc = at.hashCode();
+ for (int i = 1; i < 15; i++) {
+ assertEquals("must be equals", at.hashCode(), hc);
+ }
+ }
+
+ /*
+ * Test method for 'java.rmi.activation.ActivationID.activate(boolean)'
+ */
+ public void testActivate001() {
+ try {
+ at.activate(false);
+ assertFalse("The same parameter are give to activator", ac.b);
+ fail("Null marshallObject make a RuntimeException");
+ } catch (RuntimeException e) {
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+ }
+
+ }
+
+ public void testActivate002() {
+ try {
+ at.activate(true);
+ assertTrue("The same parameter are give to activator", ac.b);
+ fail("Null marshallObject make a RuntimeException");
+ } catch (RuntimeException e) {
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+ }
+
+ }
+
+ public void testActivate003() {
+ try {
+ ac.i = MyActivator.ActivationE;
+ at.activate(false);
+ assertFalse("The same parameter are give to activator", ac.b);
+ fail("Null marshallObject make a RuntimeException");
+ } catch (ActivationException e) {
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+ }
+ }
+
+ public void testActivate004() {
+ try {
+ ac.i = MyActivator.ActivationE;
+ at.activate(true);
+ assertTrue("The same parameter are give to activator", ac.b);
+ fail("Null marshallObject make a RuntimeException");
+ } catch (ActivationException e) {
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+ }
+
+ }
+
+ public void testActivate005() {
+ try {
+ ac.i = MyActivator.RemoteE;
+ at.activate(false);
+ assertFalse("The same parameter are give to activator", ac.b);
+ fail("Null marshallObject make a RuntimeException");
+ } catch (RemoteException e) {
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+ }
+
+ }
+
+ public void testActivate006() {
+ try {
+ ac.i = MyActivator.RemoteE;
+ at.activate(true);
+ assertTrue("The same parameter are give to activator", ac.b);
+ fail("Null marshallObject make a RuntimeException");
+ } catch (RemoteException e) {
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+ }
+
+ }
+
+ public void testActivate007() {
+ try {
+ ac.i = MyActivator.UnknownObjectE;
+ at.activate(false);
+ assertFalse("The same parameter are give to activator", ac.b);
+ fail("Null marshallObject make a RuntimeException");
+ } catch (UnknownObjectException e) {
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+ }
+
+ }
+
+ public void testActivate008() {
+ try {
+ ac.i = MyActivator.UnknownObjectE;
+ at.activate(true);
+ assertTrue("The same parameter are give to activator", ac.b);
+ fail("Null marshallObject make a RuntimeException");
+ } catch (UnknownObjectException e) {
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+ }
+
+ }
+
+ public void testActivate009() {
+ try {
+ ac.i = MyActivator.MySelfInMarshalledObjectR;
+ assertEquals(at.activate(false), ac);
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+ }
+ }
+
+ public void testActivate010() {
+ try {
+ ac.i = MyActivator.MySelfInMarshalledObjectR;
+ assertEquals(at.activate(true), ac);
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+ }
+ }
+
+ public void testActivate011() {
+ try {
+ ac.i = MyActivator.MySelfInMarshalledObjectR;
+ assertNotSame(at.activate(false), ac);
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+
+ }
+
+ }
+
+ public void testActivate012() {
+ try {
+ ac.i = MyActivator.MySelfInMarshalledObjectR;
+ assertNotSame(at.activate(true), ac);
+ } catch (Throwable e) {
+ fail("Failed with:" + e);
+
+ }
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestActivationID.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestSuiteRMIActivation.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestSuiteRMIActivation.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestSuiteRMIActivation.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestSuiteRMIActivation.java Tue May 16 06:51:00 2006
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.activation;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class TestSuiteRMIActivation {
+
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(TestSuiteRMIActivation.suite());
+ }
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for ar.org.fitc.test.rmi.activation");
+
+ suite.addTestSuite(TestActivationGroupDesc.class);
+ suite.addTestSuite(TestActivationGroupDescCommandEnvironment.class);
+ suite.addTestSuite(TestActivationGroupID.class);
+ suite.addTestSuite(TestActivationGroup.class);
+ suite.addTestSuite(TestActivationDesc.class);
+ suite.addTestSuite(TestActivationGroup_Stub.class);
+ suite.addTestSuite(TestActivatable.class);
+ suite.addTestSuite(TestActivationID.class);
+
+ return suite;
+ }
+
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/activation/TestSuiteRMIActivation.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/EchoClient2.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/EchoClient2.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/EchoClient2.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/EchoClient2.java Tue May 16 06:51:00 2006
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.dgc;
+
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+
+import ar.org.fitc.test.rmi.server.rmiclassloader.IEcho;
+
+public class EchoClient2 {
+
+ public EchoClient2() {
+ super();
+ }
+
+ public static void main(String[] args) throws Exception {
+ System.setProperty("java.rmi.server.leaseValue", "500");
+ System.setProperty("sun.rmi.dgc.server.gcInterval", "500");
+ System.setProperty("sun.rmi.client.logCalls", "true");
+ main1(args);
+ Thread.sleep(10 * 6000);
+ }
+
+ public static void main1(String[] args) throws Exception {
+ Registry registry = LocateRegistry.getRegistry();
+ IEcho stub = (IEcho) registry.lookup("Echo2");
+ String response = stub.echo("Real time in client: "
+ + System.currentTimeMillis());
+ System.out.println("Response from server: " + response);
+ System.gc();
+ }
+
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/EchoClient2.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestDistributedGarbageCollector.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestDistributedGarbageCollector.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestDistributedGarbageCollector.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestDistributedGarbageCollector.java Tue May 16 06:51:00 2006
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.dgc;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.ref.WeakReference;
+import java.rmi.Naming;
+import java.rmi.NotBoundException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.rmi.server.UnicastRemoteObject;
+
+import junit.framework.TestCase;
+import ar.org.fitc.test.rmi.server.rmiclassloader.EchoTest2;
+import ar.org.fitc.test.rmi.server.rmiclassloader.IEcho;
+
+public class TestDistributedGarbageCollector extends TestCase {
+
+ private Registry reg;
+
+ private File f;
+
+ public static void main(String[] args) throws Exception {
+ junit.textui.TestRunner.run(TestDistributedGarbageCollector.class);
+ }
+
+ public TestDistributedGarbageCollector(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ reg = LocateRegistry.createRegistry(1099);
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ UnicastRemoteObject.unexportObject(reg, true);
+ f.delete();
+ }
+
+ @SuppressWarnings( { "unused", "unchecked" })
+ private void runGc() {
+ WeakReference wr = new WeakReference(new Integer(2));
+ while (wr.get() != null) {
+ System.gc();
+ }
+ }
+
+ public void testDGC() throws NotBoundException, IOException,
+ InterruptedException {
+ System.setProperty("java.rmi.server.leaseValue", "500");
+ System.setProperty("sun.rmi.dgc.checkInterval", "500");
+ System.setProperty("sun.rmi.dgc.server.gcInterval", "500");
+ System.setProperty("java.rmi.server.logCalls", "true");
+ System.setProperty("sun.rmi.dgc.logLevel", "VERBOSE");
+ System.setProperty("sun.rmi.dgc.logCalls", "true");
+ IEcho echoServer = new EchoTest2();
+ Naming.rebind("//127.0.0.1:1099/Echo2", echoServer);
+ lookRef();
+ try {
+ Thread.sleep(5 * 6000);
+ } catch (InterruptedException e1) {
+ e1.printStackTrace();
+ }
+ Naming.unbind("//127.0.0.1:1099/Echo2");
+ try {
+ Thread.sleep(15000 * 3);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ runGc();
+ f = new File("done");
+ assertTrue("unreference method was not called", f.exists());
+ }
+
+ private void lookRef() throws NotBoundException, IOException,
+ InterruptedException {
+ ProcessBuilder pb = new ProcessBuilder(
+ "/usr/java/jdk1.5.0_05/bin/java",
+ "-cp",
+ "/home/odemo/workspace/RMIJunitTesting/:/home/odemo/workspace/TestingUtilities/",
+ "ar.org.fitc.test.rmi.dgc.EchoClient2");
+ pb.redirectErrorStream();
+ Process p = pb.start();
+ p.destroy();
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestDistributedGarbageCollector.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestLease.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestLease.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestLease.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestLease.java Tue May 16 06:51:00 2006
@@ -0,0 +1,245 @@
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.dgc;
+
+import java.rmi.dgc.Lease;
+import java.rmi.dgc.VMID;
+
+import ar.org.fitc.test.util.Messages;
+import junit.framework.TestCase;
+
+public class TestLease extends TestCase implements Messages {
+ VMID id = null;
+
+ Lease l = null;
+
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(TestLease.class);
+ }
+
+ public TestLease(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /*
+ * Test method for 'java.rmi.dgc.Lease.Lease(VMID, long)'
+ */
+ public void testLease001() {
+ long duration = 0;
+ assertNotNull(msgNotNull, new Lease(id, duration));
+ }
+
+ public void testLease002() {
+ id = new VMID();
+ long duration = 0;
+ assertNotNull(msgNotNull, new Lease(id, duration));
+ }
+
+ public void testLease003() {
+ long duration = Long.MAX_VALUE;
+ assertNotNull(msgNotNull, new Lease(id, duration));
+ }
+
+ public void testLease004() {
+ id = new VMID();
+ long duration = Long.MAX_VALUE;
+ assertNotNull(msgNotNull, new Lease(id, duration));
+ }
+
+ public void testLease005() {
+ long duration = Long.MIN_VALUE;
+ assertNotNull(msgNotNull, new Lease(id, duration));
+ }
+
+ public void testLease006() {
+ id = new VMID();
+ long duration = Long.MIN_VALUE;
+ assertNotNull(msgNotNull, new Lease(id, duration));
+ }
+
+ public void testLease007() {
+ long duration = 57690;
+ assertNotNull(msgNotNull, new Lease(id, duration));
+ }
+
+ public void testLease008() {
+ id = new VMID();
+ long duration = 57690;
+ assertNotNull(msgNotNull, new Lease(id, duration));
+ }
+
+ public void testLease009() {
+ long duration = -57689;
+ assertNotNull(msgNotNull, new Lease(id, duration));
+ }
+
+ public void testLease010() {
+ id = new VMID();
+ long duration = -57689;
+ assertNotNull(msgNotNull, new Lease(id, duration));
+ }
+
+ /*
+ * Test method for 'java.rmi.dgc.Lease.getVMID()'
+ */
+ public void testGetVMID001() {
+ long duration = 0;
+ l = new Lease(id, duration);
+ assertNull(l.getVMID());
+ }
+
+ public void testGetVMID002() {
+ id = new VMID();
+ long duration = 0;
+ l = new Lease(id, duration);
+ assertNotNull(l.getVMID());
+ }
+
+ public void testGetVMID003() {
+ long duration = Long.MAX_VALUE;
+ l = new Lease(id, duration);
+ assertNull(l.getVMID());
+ }
+
+ public void testGetVMID004() {
+ id = new VMID();
+ long duration = Long.MAX_VALUE;
+ l = new Lease(id, duration);
+ assertNotNull(l.getVMID());
+ }
+
+ public void testGetVMID005() {
+ long duration = Long.MIN_VALUE;
+ l = new Lease(id, duration);
+ assertNull(l.getVMID());
+ }
+
+ public void testGetVMID006() {
+ id = new VMID();
+ long duration = Long.MIN_VALUE;
+ l = new Lease(id, duration);
+ assertNotNull(l.getVMID());
+ }
+
+ public void testGetVMID007() {
+ long duration = 57690;
+ l = new Lease(id, duration);
+ assertNull(l.getVMID());
+ }
+
+ public void testGetVMID008() {
+ id = new VMID();
+ long duration = 57690;
+ l = new Lease(id, duration);
+ assertNotNull(l.getVMID());
+ }
+
+ public void testGetVMID009() {
+ long duration = -57689;
+ l = new Lease(id, duration);
+ assertNull(l.getVMID());
+ }
+
+ public void testGetVMID010() {
+ id = new VMID();
+ long duration = -57689;
+ l = new Lease(id, duration);
+ assertNotNull(l.getVMID());
+ }
+
+ /*
+ * Test method for 'java.rmi.dgc.Lease.getValue()'
+ */
+ public void testGetValue001() {
+ long duration = 0;
+ l = new Lease(id, duration);
+ assertEquals(l.getValue(), 0);
+ }
+
+ public void testGetValue002() {
+ id = new VMID();
+ long duration = 0;
+ l = new Lease(id, duration);
+ assertEquals(l.getValue(), 0);
+ }
+
+ public void testGetValue003() {
+ long duration = Long.MAX_VALUE;
+ l = new Lease(id, duration);
+ assertEquals(l.getValue(), Long.MAX_VALUE);
+ }
+
+ public void testGetValue004() {
+ id = new VMID();
+ long duration = Long.MAX_VALUE;
+ l = new Lease(id, duration);
+ assertEquals(l.getValue(), Long.MAX_VALUE);
+ }
+
+ public void testGetValue005() {
+ long duration = Long.MIN_VALUE;
+ l = new Lease(id, duration);
+ assertEquals(l.getValue(), Long.MIN_VALUE);
+ }
+
+ public void testGetValue006() {
+ id = new VMID();
+ long duration = Long.MIN_VALUE;
+ l = new Lease(id, duration);
+ assertEquals(l.getValue(), Long.MIN_VALUE);
+ }
+
+ public void testGetValue007() {
+ long duration = 57690;
+ l = new Lease(id, duration);
+ assertEquals(l.getValue(), 57690);
+ }
+
+ public void testGetValue008() {
+ id = new VMID();
+ long duration = 57690;
+ l = new Lease(id, duration);
+ assertEquals(l.getValue(), 57690);
+ }
+
+ public void testGetValue009() {
+ long duration = -57689;
+ l = new Lease(id, duration);
+ assertEquals(l.getValue(), -57689);
+ }
+
+ public void testGetValue010() {
+ id = new VMID();
+ long duration = -57689;
+ l = new Lease(id, duration);
+ assertEquals(l.getValue(), -57689);
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestLease.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestSuitdgc.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestSuitdgc.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestSuitdgc.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestSuitdgc.java Tue May 16 06:51:00 2006
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.dgc;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class TestSuitdgc {
+
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(TestSuitdgc.suite());
+ }
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test for ar.org.fitc.test.rmi");
+
+ suite.addTestSuite(TestLease.class);
+ suite.addTestSuite(TestVMID.class);
+
+ return suite;
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestSuitdgc.java
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestVMID.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestVMID.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestVMID.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestVMID.java Tue May 16 06:51:00 2006
@@ -0,0 +1,197 @@
+/*
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @author Hugo Beilis
+ * @author Osvaldo Demo
+ * @author Jorge Rafael
+ * @version 1.0
+ */
+package ar.org.fitc.test.rmi.dgc;
+
+import java.rmi.dgc.VMID;
+
+import java.util.StringTokenizer;
+
+import ar.org.fitc.test.util.Messages;
+
+import junit.framework.TestCase;
+
+public class TestVMID extends TestCase implements Messages {
+ VMID vmid = null;
+
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(TestVMID.class);
+ }
+
+ public TestVMID(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /*
+ * Test method for 'java.rmi.dgc.VMID.hashCode()'
+ */
+ public final void testHashCode001() {
+ assertNotSame("must not be equals", new VMID().hashCode(), new VMID()
+ .hashCode());
+ }
+
+ public final void testHashCode002() {
+ vmid = new VMID();
+ int hc = vmid.hashCode();
+ for (int i = 1; i < 15; i++) {
+ assertEquals("must be equals", vmid.hashCode(), hc);
+ }
+ }
+
+ /*
+ * Test method for 'java.rmi.dgc.VMID.equals(Object)'
+ */
+ public void testEquals001() {
+
+ vmid = new VMID();
+ assertTrue("must be equals", vmid.equals(vmid));
+
+ }
+
+ public void testEquals002() {
+ vmid = new VMID();
+ assertFalse("mustn't be equals", vmid.equals(null));
+
+ }
+
+ public void testEquals003() {
+ vmid = new VMID();
+ assertFalse("mustn't be equals", vmid.equals(new VMID()));
+
+ }
+
+ public void testEquals004() {
+ vmid = new VMID();
+ VMID uid2 = new VMID();
+ assertEquals("must be equals", uid2.equals(vmid), vmid.equals(uid2));
+
+ }
+
+ public void testEquals005() {
+ vmid = new VMID();
+ Object o = new Object();
+ assertFalse("must not be equals", vmid.equals(o));
+
+ }
+
+ public void testEquals006() {
+ vmid = new VMID();
+ assertFalse("must not be equals", vmid.equals(null));
+
+ }
+
+ public void testEquals007() {
+ vmid = new VMID();
+ for (int i = 1; i < 10; i++) {
+ assertTrue("must be equals", vmid.equals(vmid));
+ }
+
+ }
+
+ public void testEquals008() {
+ vmid = new VMID();
+ for (int i = 1; i < 10; i++) {
+ assertFalse("mustn't be equals", vmid.equals(null));
+ }
+
+ }
+
+ public void testEquals009() {
+ vmid = new VMID();
+ for (int i = 1; i < 10; i++) {
+ assertFalse("mustn't be equals", vmid.equals(new VMID()));
+ }
+
+ }
+
+ public void testEquals010() {
+ vmid = new VMID();
+ VMID uid2 = new VMID();
+ for (int i = 1; i < 10; i++) {
+ assertEquals("must be equals", uid2.equals(vmid), vmid.equals(uid2));
+ }
+
+ }
+
+ public void testEquals011() {
+ vmid = new VMID();
+ Object o = new Object();
+ for (int i = 1; i < 10; i++) {
+ assertFalse("must not be equals", vmid.equals(o));
+ }
+
+ }
+
+ public void testEquals012() {
+ vmid = new VMID();
+ for (int i = 1; i < 10; i++) {
+ assertFalse("must not be equals", vmid.equals(null));
+ }
+
+ }
+
+ /*
+ * Test method for 'java.rmi.dgc..toString()'
+ */
+ public final void testToString001() {
+ vmid = new VMID();
+ System.out.print(vmid.toString());
+
+ StringTokenizer st = new StringTokenizer(vmid.toString(), ":");
+ String s[] = new String[5];
+ for (int i = 0; i < 4; i++) {
+ s[i] = st.nextToken(":");
+ }
+ VMID vmid2 = new VMID();
+ StringTokenizer st2 = new StringTokenizer(vmid2.toString(), ":");
+ String s2[] = new String[5];
+ for (int i = 0; i < 4; i++) {
+ s2[i] = st2.nextToken(":");
+ }
+ for (int i = 0; i < 3; i++) {
+ assertEquals(s[i], s2[i]);
+ }
+ assertNotSame(s[3], s2[3]);
+ }
+
+ /*
+ * Test method for 'java.rmi.dgc..()'
+ */
+ public final void testVMID001() {
+ assertNotNull(msgNotNull, new VMID());
+ }
+
+ /*
+ * Test method for 'java.rmi.dgc..isUnique()'
+ */
+ public final void testIsUnique001() {
+ assertTrue(new VMID().isUnique());
+ }
+
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/src/ar/org/fitc/test/rmi/dgc/TestVMID.java
------------------------------------------------------------------------------
svn:executable = *