Search in sources :

Example 1 with Color

use of org.apache.openejb.test.object.Color in project tomee by apache.

the class StatelessRmiIiopTests method test60_returnColor.

/*-------------------------------------------------*/
/*  Enum                                           */
/*-------------------------------------------------*/
public void test60_returnColor() {
    try {
        final Color expected = Color.GREEN;
        final Color actual = (Color) ejbObject.returnColor(expected);
        assertNotNull("The Color returned is null", actual);
        assertEquals(expected, actual);
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
Also used : Color(org.apache.openejb.test.object.Color) RemoteException(java.rmi.RemoteException)

Example 2 with Color

use of org.apache.openejb.test.object.Color in project tomee by apache.

the class StatelessRmiIiopTests method test61_returnColor2.

public void test61_returnColor2() {
    try {
        final Color expected = Color.GREEN;
        final Color actual = (Color) ejbObject.returnColor();
        assertNotNull("The Color returned is null", actual);
        assertEquals(expected, actual);
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
Also used : Color(org.apache.openejb.test.object.Color) RemoteException(java.rmi.RemoteException)

Example 3 with Color

use of org.apache.openejb.test.object.Color in project tomee by apache.

the class StatelessRmiIiopTests method test63_returnNestedColor2.

public void test63_returnNestedColor2() {
    try {
        final Color expected = Color.GREEN;
        final ObjectGraph graph = ejbObject.returnNestedColor();
        assertNotNull("The ObjectGraph is null", graph);
        final Color actual = (Color) graph.getObject();
        assertNotNull("The Color returned is null", actual);
        assertEquals(expected, actual);
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
Also used : Color(org.apache.openejb.test.object.Color) ObjectGraph(org.apache.openejb.test.object.ObjectGraph) RemoteException(java.rmi.RemoteException)

Example 4 with Color

use of org.apache.openejb.test.object.Color in project tomee by apache.

the class StatelessRmiIiopTests method test62_returnNestedColor.

public void test62_returnNestedColor() {
    try {
        final Color expected = Color.GREEN;
        final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
        assertNotNull("The ObjectGraph is null", graph);
        final Color actual = (Color) graph.getObject();
        assertNotNull("The Color returned is null", actual);
        assertEquals(expected, actual);
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
Also used : Color(org.apache.openejb.test.object.Color) ObjectGraph(org.apache.openejb.test.object.ObjectGraph) RemoteException(java.rmi.RemoteException)

Aggregations

RemoteException (java.rmi.RemoteException)4 Color (org.apache.openejb.test.object.Color)4 ObjectGraph (org.apache.openejb.test.object.ObjectGraph)2