803804805806807808809810811812813
@Test public void test_object() throws Exception { Any outAny = setup.getClientOrb().create_any(); outAny.insert_Object(server); assertEquals(server, outAny.extract_Object()); Any inAny = server.bounce_any(outAny); //can't readily test equality of object references
831832833834835836837838839840841
@Test public void test_object2() throws Exception { Any outAny = setup.getClientOrb().create_any(); outAny.insert_Object(server, AnyServerHelper.type()); assertEquals(server, outAny.extract_Object()); Any inAny = server.bounce_any(outAny); //can't readily test equality of object references
844845846847848849850851852853854
@Test public void test_extract_objref() { Any outAny = setup.getClientOrb().create_any(); outAny.insert_Object(server, AnyServerHelper.type()); assertEquals(server, ((org.jacorb.orb.Any)outAny).extract_objref()); Any inAny = server.bounce_any(outAny); //can't readily test equality of object references
21392140214121422143214421452146214721482149
{ Any any1 = setup.getClientOrb().create_any(); Any any2 = setup.getClientOrb().create_any(); any1.insert_Object(null); any2.insert_Object(null); assertEquals(any1, any2); assertEquals(any2, any1); any1.insert_Object(server);
21452146214721482149215021512152215321542155
assertEquals(any1, any2); assertEquals(any2, any1); any1.insert_Object(server); any2.insert_Object(server); assertEquals(any1, any2); assertEquals(any2, any1); any1.insert_Object(null, AnyServerHelper.type());
858859860861862863864865866867868
@Test public void test_object_null() throws Exception { Any outAny = setup.getClientOrb().create_any(); outAny.insert_Object(null); assertNull(outAny.extract_Object()); Any inAny = server.bounce_any(outAny); assertTrue(outAny.equal(inAny));
313314315316317318319320321322323
// Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb));