Examples of TScenarioOne


Examples of org.apache.tuscany.sca.test.corba.types.TScenarioOne

     * Java interface.
     *
     * @param componentName
     */
    private void testClientUsingUserProvidedInterface(String componentName) {
        TScenarioOne component = node.getService(TScenarioOne.class, componentName);
        TRichStruct tRichStruct = getTRichStruct();

        try {
            TRichStruct result = component.setRichStruct(tRichStruct);
            assertTrue(equalTo(result, tRichStruct));
        } catch (Exception e) {
            fail();
        }

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

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

Examples of org.apache.tuscany.sca.test.corba.types.TScenarioOne

     * Java interface.
     *
     * @param componentName
     */
    private void testClientUsingUserProvidedInterface(String componentName) {
        TScenarioOne component = node.getService(TScenarioOne.class, componentName);
        TRichStruct tRichStruct = getTRichStruct();

        try {
            TRichStruct result = component.setRichStruct(tRichStruct);
            assertTrue(equalTo(result, tRichStruct));
        } catch (Exception e) {
            fail();
        }

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

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

Examples of org.apache.tuscany.sca.test.corba.types.TScenarioOne

     * Java interface.
     *
     * @param componentName
     */
    private void testClientUsingUserProvidedInterface(String componentName) {
        TScenarioOne component = domain.getService(TScenarioOne.class, componentName);
        TRichStruct tRichStruct = getTRichStruct();

        try {
            TRichStruct result = component.setRichStruct(tRichStruct);
            assertTrue(equalTo(result, tRichStruct));
        } catch (Exception e) {
            fail();
        }

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

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

Examples of org.apache.tuscany.sca.test.corba.types.TScenarioOne

     * Java interface.
     *
     * @param componentName
     */
    private void testClientUsingUserProvidedInterface(String componentName) {
        TScenarioOne component = node.getService(TScenarioOne.class, componentName);
        TRichStruct tRichStruct = getTRichStruct();

        try {
            TRichStruct result = component.setRichStruct(tRichStruct);
            assertTrue(equalTo(result, tRichStruct));
        } catch (Exception e) {
            fail();
        }

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

        try {
            tRichStruct.longField = 1;
            tRichStruct.innerStruct.color = TColor.red;
            component.setRichStruct(tRichStruct);
        } catch (Exception e) {
            assertTrue(e instanceof WrongColor);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.