Package org.apache.openejb.test.object

Examples of org.apache.openejb.test.object.ObjectGraph


        }
    }

    public void test43_returnNestedEJBObject2() {
        try{
            final ObjectGraph graph = ejbObject.returnNestedEJBObject();
            assertNotNull("The ObjectGraph is null", graph);

            final EncSingletonObject actual = (EncSingletonObject)PortableRemoteObject.narrow(graph.getObject(), EncSingletonObject.class);
            assertNotNull("The EJBHome returned is null", actual);
        } catch (final Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
        }
    }
View Full Code Here


            assertNotNull("The EJBHome returned from JNDI is null", home);

            final EJBMetaData expected = home.getEJBMetaData();
            assertNotNull("The EJBMetaData returned is null", expected);

            final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
            assertNotNull("The ObjectGraph is null", graph);

            final EJBMetaData actual = (EJBMetaData)graph.getObject();
            assertNotNull("The EJBMetaData returned is null", actual);
            assertEquals(expected.getHomeInterfaceClass(), actual.getHomeInterfaceClass());
            assertEquals(expected.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
        } catch (final Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
View Full Code Here

        }
    }

    public void test48_returnNestedEJBMetaData2() {
        try{
            final ObjectGraph graph = ejbObject.returnNestedEJBMetaData();
            assertNotNull("The ObjectGraph is null", graph);

            final EJBMetaData actual = (EJBMetaData)graph.getObject();
            assertNotNull("The EJBMetaData returned is null", actual);
            assertNotNull("The home interface class of the EJBMetaData is null", actual.getHomeInterfaceClass());
            assertNotNull("The remote interface class of the EJBMetaData is null", actual.getRemoteInterfaceClass());
        } catch (final Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
View Full Code Here

            final Handle expected = object.getHandle();
            assertNotNull("The EJBObject Handle returned is null", expected);
            assertNotNull("The EJBObject in the Handle is null", expected.getEJBObject());

            final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
            assertNotNull("The ObjectGraph is null", graph);

            final Handle actual = (Handle)graph.getObject();
            assertNotNull("The EJBObject Handle returned is null", actual);
            assertNotNull("The EJBObject in the Handle is null", actual.getEJBObject());

            final EJBObject exp = expected.getEJBObject();
            final EJBObject act = actual.getEJBObject();
View Full Code Here

        }
    }

    public void test53_returnNestedHandle2() {
        try{
            final ObjectGraph graph = ejbObject.returnNestedHandle();
            assertNotNull("The ObjectGraph is null", graph);

            final Handle actual = (Handle)graph.getObject();
            assertNotNull("The EJBObject Handle returned is null", actual);
            assertNotNull("The EJBObject in the Handle is null", actual.getEJBObject());
        } catch (final Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
        }
View Full Code Here

    }

    public void test59_returnClassObjectGraph() {
        try {
            final Class[] primitives = {boolean.class, byte.class, char.class, short.class, int.class, long.class, float.class, double.class};
            final ObjectGraph expectedGraph = new ObjectGraph(primitives);

            final ObjectGraph actualGraph = ejbObject.returnObjectGraph(expectedGraph);

            final Class[] expected = (Class[]) expectedGraph.getObject();
            final Class[] actual = (Class[]) actualGraph.getObject();

            assertEquals(expected.length, actual.length);
            for (int i = 0; i < expected.length; i++) {
                assertEquals(expected[i], actual[i]);
            }
View Full Code Here

        try{
            Object obj = initialContext.lookup("client/tests/stateful/EncBean");
            EncStatefulHome expected = (EncStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, EncStatefulHome.class);
            assertNotNull("The EJBHome returned from JNDI is null", expected);

            ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
            assertNotNull("The ObjectGraph is null", graph);

            EncStatefulHome actual = (EncStatefulHome)javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncStatefulHome.class);
            assertNotNull("The EJBHome returned is null", actual);
        } catch (Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
        }
    }
View Full Code Here

        }
    }

    public void test38_returnNestedEJBHome2() {
        try{
            ObjectGraph graph = ejbObject.returnNestedEJBHome();
            assertNotNull("The ObjectGraph is null", graph);

            EncStatefulHome actual = (EncStatefulHome)javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncStatefulHome.class);
            assertNotNull("The EJBHome returned is null", actual);
        } catch (Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
        }
    }
View Full Code Here

            assertNotNull("The EJBHome returned from JNDI is null", home);

            EncStatefulObject expected = home.create("test_42 StatefulBean");
            assertNotNull("The EJBObject created is null", expected);

            ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
            assertNotNull("The ObjectGraph is null", graph);

            EncStatefulObject actual = (EncStatefulObject)javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncStatefulObject.class);
            assertNotNull("The EJBObject returned is null", actual);

            assertTrue("The EJBObejcts are not identical", expected.isIdentical(actual));
        } catch (Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
View Full Code Here

        }
    }

    public void test43_returnNestedEJBObject2() {
        try{
            ObjectGraph graph = ejbObject.returnNestedEJBObject();
            assertNotNull("The ObjectGraph is null", graph);

            EncStatefulObject actual = (EncStatefulObject)javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncStatefulObject.class);
            assertNotNull("The EJBHome returned is null", actual);
        } catch (Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.test.object.ObjectGraph

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.