org.openorb.orb.test.dynamic
Class DynAnyTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.openorb.orb.test.corba.CORBATestCase
              extended by org.openorb.orb.test.dynamic.DynAnyTest
All Implemented Interfaces:
junit.framework.Test

public class DynAnyTest
extends CORBATestCase

A DynAny test case.

Author:
Chris Wood

Constructor Summary
DynAnyTest(java.lang.String name)
          Constructor.
 
Method Summary
static void main(java.lang.String[] args)
          The entry point of the test case.
 void setUp()
          Set up the test case.
 void testDynArray()
          Test the various operations within the DynArray The DynArray is created with a TypeCode and a short TypeCode for the discriminator.
 void testDynBasic()
          Test the various basic inserting within the DynAnys.
 void testDynEnum()
          Test the various operations inserting within the DynEnums.
 void testDynFixed()
          Test the various operations inserting within the DynFixeds.
 void testDynSequence()
          Test the various operations within the DynSequence The DynSequence is created with a TypeCode and a length.
 void testDynStruct()
          Test the various operations for the DynStruct.
 void testDynUnion()
          Test the various operations inserting within the DynUnions.
 
Methods inherited from class org.openorb.orb.test.corba.CORBATestCase
getORB, tearDown
 
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

DynAnyTest

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

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

setUp

public void setUp()
Set up the test case.

Overrides:
setUp in class CORBATestCase

testDynBasic

public void testDynBasic()
                  throws org.omg.CORBA.UserException
Test the various basic inserting within the DynAnys. The DynAny is created, a corresponding value is inserted and then the DynAny is destroyed to avoid memory leak (explicit destruction is necessary). The tested types are char, wchar, boolean, octet, short, ushort, long, ulong, longlong, ulonglong, float, double, any, string, wstring, typecode, object. Basic DynAny operations (rewind, component_count) are also tested.

Throws:
org.omg.CORBA.UserException - if any of the test case fails

testDynEnum

public void testDynEnum()
                 throws org.omg.CORBA.UserException
Test the various operations inserting within the DynEnums. The DynEnum is created with a TypeCode. DynEnum operations (set_as_string, set_as_ulong ) and DynAny operations (rewind, component_count) are also tested.

Throws:
org.omg.CORBA.UserException - if any of the test case fails

testDynStruct

public void testDynStruct()
                   throws org.omg.CORBA.UserException
Test the various operations for the DynStruct. The DynStruct is created with an org.omg.GIOP.MessageHeader_1_1 struct and with org.omg.GIOP.MessageHeader_1_2, an alias for the former. The following operations have few or no tests: assign, from_any, to_any, destroy, copy, set_members, set_members_as_dyn_any.

Throws:
org.omg.CORBA.UserException - if any test fails

testDynFixed

public void testDynFixed()
                  throws org.omg.CORBA.UserException
Test the various operations inserting within the DynFixeds. The DynFixed is created with a TypeCode. DynFixed operations (get/set value) and DynAny operations (rewind, component_count) are also tested.

Throws:
org.omg.CORBA.UserException - if any of the test case fails

testDynUnion

public void testDynUnion()
                  throws org.omg.CORBA.UserException
Test the various operations inserting within the DynUnions. The DynUnion is created with a TypeCode and a short TypeCode for the discriminator. DynUnion operations (get/set discriminator, get/set members) and DynAny operations (rewind, component_count) are also tested.

Throws:
org.omg.CORBA.UserException - if any of the test case fails

testDynSequence

public void testDynSequence()
                     throws org.omg.CORBA.UserException
Test the various operations within the DynSequence The DynSequence is created with a TypeCode and a length. DynSequence operations (get/set elements) and DynAny operations (rewind, component_count) are also tested.

Throws:
org.omg.CORBA.UserException - if any of the test case fails

testDynArray

public void testDynArray()
                  throws org.omg.CORBA.UserException
Test the various operations within the DynArray The DynArray is created with a TypeCode and a short TypeCode for the discriminator. DynArray operations (get/set discriminator, get/set members) and DynAny operations (rewind, component_count) are also tested.

Throws:
org.omg.CORBA.UserException - if any of the test case fails

main

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

Parameters:
args - The command line arguments.