org.openorb.orb.test.rmi.complex
Class ComplexTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.openorb.orb.test.rmi.RMITestCase
              extended by org.openorb.orb.test.rmi.complex.ComplexTest
All Implemented Interfaces:
junit.framework.Test

public class ComplexTest
extends RMITestCase

This test suit provides addition tests cases for complex RMI over IIOP data types. In particular, it exchanges complexe data types like strings, serializable ojects, remote objects and classes.

Author:
Jerome Daniel, Michael Rumpf

Constructor Summary
ComplexTest(java.lang.String name)
          Constructor.
 
Method Summary
static void main(java.lang.String[] args)
          The entry point of the test case.
protected  void setUp()
          Set up the test case.
protected  void tearDown()
          Dispose the test case.
 void testAny()
          Test echoing a Long.
 void testBigDecimal()
          Test the BigDecimal type.
 void testBitSet()
          This method tests whether we can marshal and unmarshal a class of type java.lang.math.BitSet correctly.
 void testClass()
          Echo a java.lang.Class.
 void testCollections()
          Test Java collections.
 void testCorbaObjects()
          Test echoing CORBA Objects and specialized versions of type CosNaming.NamingContext.
 void testCustomSerializable()
          Write some objects which use some of the custom serializable functions
 void testDouble()
          Test echoing a Long.
 void testEchoNull()
          Write some objects which use some of the custom serializable functions
 void testEchoRemote()
          Echo a remote object.
 void testFloat()
          Test echoing a Long.
 void testIDLEntity()
          Test IDLEntity derived types.
 void testInteger()
          Test echoing a Long.
 void testLong()
          Test echoing a Long.
 void testMultipleObjectArray()
          Test echoing a java.rmi.Remote array, a serializable object.
 void testObject()
          Echo a java.lang.Object.
 void testPutFields()
          Test the PutField serialization mechanism.
 void testRemoteArray()
          Test echoing a java.rmi.Remote array, a serializable object.
 void testRemoteObjectArray()
          Test echoing a java.rmi.Remote array, a serializable object.
 void testSerialInterfaceMarshal()
          This method tests whether we can marshal a Serializable interface.
 void testSerialPersistentFields()
          Test the serialPersistentFields serialization mechanism.
 void testString()
          Test echoing a string.
 void testThrowable()
          Test the Throwable type.
 void testTimestamp()
          This method tests whether we can marshal and unmarshal a class of type java.sql.Timestamp correctly.
 void testTypeHolder()
          Test echoing CORBA Objects.
 void testVector()
          Test echoing a java.util.Vector, a serializable object.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComplexTest

public ComplexTest(java.lang.String name)
Constructor.

Parameters:
name - The name of the test case.
Method Detail

setUp

protected void setUp()
Set up the test case.

Overrides:
setUp in class RMITestCase

tearDown

protected void tearDown()
Dispose the test case.

Overrides:
tearDown in class RMITestCase

testString

public void testString()
                throws java.lang.Exception
Test echoing a string. Strings are marshalled as valuetypes, which allows nulls and multiple indirected writes.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testLong

public void testLong()
              throws java.lang.Exception
Test echoing a Long. Long are marshalled as valuetypes, which allows nulls and multiple indirected writes.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testInteger

public void testInteger()
                 throws java.lang.Exception
Test echoing a Long. Long are marshalled as valuetypes, which allows nulls and multiple indirected writes.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testFloat

public void testFloat()
               throws java.lang.Exception
Test echoing a Long. Long are marshalled as valuetypes, which allows nulls and multiple indirected writes.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testDouble

public void testDouble()
                throws java.lang.Exception
Test echoing a Long. Long are marshalled as valuetypes, which allows nulls and multiple indirected writes.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testAny

public void testAny()
             throws java.lang.Exception
Test echoing a Long. Long are marshalled as valuetypes, which allows nulls and multiple indirected writes.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testVector

public void testVector()
                throws java.lang.Exception
Test echoing a java.util.Vector, a serializable object. This test tries the RMI over IIOP serializer engine.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testClass

public void testClass()
               throws java.lang.Exception
Echo a java.lang.Class.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testObject

public void testObject()
                throws java.lang.Exception
Echo a java.lang.Object.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testEchoRemote

public void testEchoRemote()
                    throws java.lang.Exception
Echo a remote object.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testEchoNull

public void testEchoNull()
                  throws java.lang.Exception
Write some objects which use some of the custom serializable functions

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testCustomSerializable

public void testCustomSerializable()
                            throws java.lang.Exception
Write some objects which use some of the custom serializable functions

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testRemoteArray

public void testRemoteArray()
                     throws java.lang.Exception
Test echoing a java.rmi.Remote array, a serializable object. This test tries the RMI over IIOP serializer engine, especially the readArray method.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testCorbaObjects

public void testCorbaObjects()
                      throws java.lang.Exception
Test echoing CORBA Objects and specialized versions of type CosNaming.NamingContext.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testTypeHolder

public void testTypeHolder()
                    throws java.lang.Exception
Test echoing CORBA Objects.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testPutFields

public void testPutFields()
                   throws java.lang.Exception
Test the PutField serialization mechanism.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testSerialPersistentFields

public void testSerialPersistentFields()
                                throws java.lang.Exception
Test the serialPersistentFields serialization mechanism.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testCollections

public void testCollections()
                     throws java.lang.Exception
Test Java collections.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testIDLEntity

public void testIDLEntity()
                   throws java.lang.Exception
Test IDLEntity derived types.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testThrowable

public void testThrowable()
                   throws java.lang.Exception
Test the Throwable type.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testBigDecimal

public void testBigDecimal()
                    throws java.lang.Exception
Test the BigDecimal type.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testRemoteObjectArray

public void testRemoteObjectArray()
                           throws java.lang.Exception
Test echoing a java.rmi.Remote array, a serializable object. This test tries the RMI over IIOP serializer engine, especially the readArray method.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testMultipleObjectArray

public void testMultipleObjectArray()
                             throws java.lang.Exception
Test echoing a java.rmi.Remote array, a serializable object. This test tries the RMI over IIOP serializer engine, especially the readArray method.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testSerialInterfaceMarshal

public void testSerialInterfaceMarshal()
                                throws java.lang.Exception
This method tests whether we can marshal a Serializable interface. This crashed the VM in previous versions because the server tried to call DeserializationKernel.allocateNewObject with the interface instead of the implementation class.

Throws:
java.lang.Exception - If any unexpected problem occurs in the test case

testBitSet

public void testBitSet()
                throws java.lang.Exception
This method tests whether we can marshal and unmarshal a class of type java.lang.math.BitSet correctly.

Throws:
java.lang.Exception

testTimestamp

public void testTimestamp()
                   throws java.lang.Exception
This method tests whether we can marshal and unmarshal a class of type java.sql.Timestamp correctly.

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
The entry point of the test case.

Parameters:
args - The command line parameters.