Package org.apache.tuscany.sca.test.corba.generated

Examples of org.apache.tuscany.sca.test.corba.generated.ScenarioOneOperations


     * interface.
     *
     * @param componentName
     */
    private void testClientUsingGeneratedInterface(String componentName) {
        ScenarioOneOperations component = node.getService(ScenarioOneOperations.class, componentName);
        RichStruct richStruct = getRichStruct();

        try {
            RichStruct result = component.setRichStruct(richStruct);
            assertTrue(equalTo(result, richStruct));
        } catch (Exception e) {
            e.printStackTrace();
            fail();
        }

        try {
            richStruct.longField = 0;
            component.setRichStruct(richStruct);
            fail();
        } catch (Exception e) {
            assertTrue(e instanceof UnexpectedException);
        }

        try {
            richStruct.longField = 1;
            richStruct.innerStruct.color = Color.red;
            component.setRichStruct(richStruct);
        } catch (Exception e) {
            assertTrue(e instanceof WrongColor);
        }
    }
View Full Code Here


     * interface.
     *
     * @param componentName
     */
    private void testClientUsingGeneratedInterface(String componentName) {
        ScenarioOneOperations component = node.getService(ScenarioOneOperations.class, componentName);
        RichStruct richStruct = getRichStruct();

        try {
            RichStruct result = component.setRichStruct(richStruct);
            assertTrue(equalTo(result, richStruct));
        } catch (Exception e) {
            e.printStackTrace();
            fail();
        }

        try {
            richStruct.longField = 0;
            component.setRichStruct(richStruct);
            fail();
        } catch (Exception e) {
            assertTrue(e instanceof UnexpectedException);
        }

        try {
            richStruct.longField = 1;
            richStruct.innerStruct.color = Color.red;
            component.setRichStruct(richStruct);
        } catch (Exception e) {
            assertTrue(e instanceof WrongColor);
        }
    }
View Full Code Here

     * interface.
     *
     * @param componentName
     */
    private void testClientUsingGeneratedInterface(String componentName) {
        ScenarioOneOperations component = domain.getService(ScenarioOneOperations.class, componentName);
        RichStruct richStruct = getRichStruct();

        try {
            RichStruct result = component.setRichStruct(richStruct);
            assertTrue(equalTo(result, richStruct));
        } catch (Exception e) {
            e.printStackTrace();
            fail();
        }

        try {
            richStruct.longField = 0;
            component.setRichStruct(richStruct);
            fail();
        } catch (Exception e) {
            assertTrue(e instanceof UnexpectedException);
        }

        try {
            richStruct.longField = 1;
            richStruct.innerStruct.color = Color.red;
            component.setRichStruct(richStruct);
        } catch (Exception e) {
            assertTrue(e instanceof WrongColor);
        }
    }
View Full Code Here

     * interface.
     *
     * @param componentName
     */
    private void testClientUsingGeneratedInterface(String componentName) {
        ScenarioOneOperations component = node.getService(ScenarioOneOperations.class, componentName);
        RichStruct richStruct = getRichStruct();

        try {
            RichStruct result = component.setRichStruct(richStruct);
            assertTrue(equalTo(result, richStruct));
        } catch (Exception e) {
            e.printStackTrace();
            fail();
        }

        try {
            richStruct.longField = 0;
            component.setRichStruct(richStruct);
            fail();
        } catch (Exception e) {
            assertTrue(e instanceof UnexpectedException);
        }

        try {
            richStruct.longField = 1;
            richStruct.innerStruct.color = Color.red;
            component.setRichStruct(richStruct);
        } catch (Exception e) {
            assertTrue(e instanceof WrongColor);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.test.corba.generated.ScenarioOneOperations

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.