Package org.apache.tuscany.sca.binding.corba.testing.generated

Examples of org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct


            String[] ids = new String[] {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"};
            servant.setIds(ids);
            bindServant(servant, "TestObject");
            TestObject testObject = TestObjectHelper.narrow(bindReference("TestObject"));
            SomeStruct ss = new SomeStruct();
            SimpleStruct inner = new SimpleStruct();
            inner.field1 = TestConstants.STR_1;
            inner.field2 = TestConstants.INT_1;
            ss.innerStruct = inner;
            ss.str = TestConstants.STR_2;
            ss.str_list = TestConstants.STR_ARR_1;
View Full Code Here


            String[] ids = new String[] {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"};
            servant.setIds(ids);
            bindServant(servant, "InvalidTestObject");
            TestObject to = TestObjectHelper.narrow(bindReference("InvalidTestObject"));
            SomeStruct str = new SomeStruct();
            str.innerStruct = new SimpleStruct();
            str.innerStruct.field1 = "Whatever";
            str.str = "Whatever";
            str.str_list = new String[] {};
            str.threeDimSeq = new int[][][] {};
            str.twoDimSeq = new int[][] {};
View Full Code Here

    @Test
    public void test_TestObject_setStruct() {
        DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, "setStruct");

        SomeStruct struct = new SomeStruct();
        SimpleStruct inner = new SimpleStruct();
        inner.field1 = TestConstants.STR_1;
        inner.field2 = TestConstants.INT_1;
        struct.innerStruct = inner;
        struct.str_list = TestConstants.STR_ARR_2;
        struct.twoDimSeq = TestConstants.INT_ARRAY_2_DIM;
View Full Code Here

    /**
     * Test passing (and getting as result) simple two-field structure
     */
    @Test
    public void test_TestObject_setSimpleStruct() {
        SimpleStruct struct = new SimpleStruct();
        struct.field1 = TestConstants.STR_1;
        struct.field2 = TestConstants.INT_1;
        DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, "setSimpleStruct");
        try {
            request.setOutputType(SimpleStruct.class);
            request.addArgument(struct);
            DynaCorbaResponse response = request.invoke();
            SimpleStruct retStruct = (SimpleStruct)response.getContent();
            assertTrue(retStruct.field1.equals(struct.field1) && retStruct.field2 == struct.field2);
        } catch (Exception e) {
            e.printStackTrace();
            fail("Exception occured during tests: " + e);
        }
View Full Code Here

    public void test_TestObject_pickStructFromArgs() {
        SomeStruct arg1 = new SomeStruct();
        SomeStruct arg2 = new SomeStruct();
        SomeStruct arg3 = new SomeStruct();

        SimpleStruct inner = new SimpleStruct();
        inner.field1 = TestConstants.STR_1;
        inner.field2 = TestConstants.INT_1;

        arg1.innerStruct = inner;
        arg2.innerStruct = inner;
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct

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.