Examples of SimpleStruct


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, "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

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

    @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

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

    /**
     * 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

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

    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

Examples of org.apache.type_test.types1.SimpleStruct

            && (x.getVarString().equals(y.getVarString()));
  //&& (equalsNilable(x.getVarAttrString(), y.getVarAttrString()));
    }
   
    public void testSimpleStruct() throws Exception {
        SimpleStruct x = new SimpleStruct();
        x.setVarFloat(3.14f);
        x.setVarInt(new BigInteger("42"));
        x.setVarString("Hello There");

        SimpleStruct yOrig = new SimpleStruct();
        yOrig.setVarFloat(1.414f);
        yOrig.setVarInt(new BigInteger("13"));
        yOrig.setVarString("Cheerio");

        Holder<SimpleStruct> y = new Holder<SimpleStruct>(yOrig);
        Holder<SimpleStruct> z = new Holder<SimpleStruct>();
        SimpleStruct ret = client.testSimpleStruct(x, y, z);

        if (!perfTestOnly) {
            assertTrue("testSimpleStruct(): Incorrect value for inout param",
                       equals(x, y.value));
            assertTrue("testSimpleStruct(): Incorrect value for out param",
View Full Code Here

Examples of org.apache.type_test.types1.SimpleStruct

            return equals(x, y);
        }
    }
   
    public void testNestedStruct() throws Exception {
        SimpleStruct xs = new SimpleStruct();
        xs.setVarFloat(30.14);
        xs.setVarInt(new BigInteger("420"));
        xs.setVarString("NESTED Hello There");
        NestedStruct x = new NestedStruct();
        x.setVarFloat(new BigDecimal("3.14"));
        x.setVarInt(42);
        x.setVarString("Hello There");
        x.setVarEmptyStruct(new EmptyStruct());
        x.setVarStruct(xs);

        SimpleStruct ys = new SimpleStruct();
        ys.setVarFloat(10.414);
        ys.setVarInt(new BigInteger("130"));
        ys.setVarString("NESTED Cheerio");

        NestedStruct yOrig = new NestedStruct();
        yOrig.setVarFloat(new BigDecimal("1.414"));
        yOrig.setVarInt(13);
        yOrig.setVarString("Cheerio");
View Full Code Here

Examples of org.apache.type_test.types1.SimpleStruct

        yOrig.setAttrString2("DerivedAttr2-y");

        Holder<SimpleStruct> y = new Holder<SimpleStruct>(yOrig);
        Holder<SimpleStruct> z = new Holder<SimpleStruct>();

        SimpleStruct ret;
        if (testDocLiteral) {
            ret = docClient.testSimpleStruct(x, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testSimpleStruct(x, y, z);
        } else {
View Full Code Here

Examples of org.apache.type_test.types1.SimpleStruct

    @Test
    public void testSimpleStruct() throws Exception {
        if (!shouldRunTest("SimpleStruct")) {
            return;
        }
        SimpleStruct x = new SimpleStruct();
        x.setVarFloat(3.14f);
        x.setVarInt(new BigInteger("42"));
        x.setVarString("Hello There");

        SimpleStruct yOrig = new SimpleStruct();
        yOrig.setVarFloat(1.414f);
        yOrig.setVarInt(new BigInteger("13"));
        yOrig.setVarString("Cheerio");

        Holder<SimpleStruct> y = new Holder<SimpleStruct>(yOrig);
        Holder<SimpleStruct> z = new Holder<SimpleStruct>();
        SimpleStruct ret;
        if (testDocLiteral) {
            ret = docClient.testSimpleStruct(x, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testSimpleStruct(x, y, z);
        } else {
View Full Code Here

Examples of org.apache.type_test.types1.SimpleStruct

    @Test
    public void testNestedStruct() throws Exception {
        if (!shouldRunTest("NestedStruct")) {
            return;
        }
        SimpleStruct xs = new SimpleStruct();
        xs.setVarFloat(30.14);
        xs.setVarInt(new BigInteger("420"));
        xs.setVarString("NESTED Hello There");
        NestedStruct x = new NestedStruct();
        x.setVarFloat(new BigDecimal("3.14"));
        x.setVarInt(42);
        x.setVarString("Hello There");
        x.setVarEmptyStruct(new EmptyStruct());
        x.setVarStruct(xs);

        SimpleStruct ys = new SimpleStruct();
        ys.setVarFloat(10.414);
        ys.setVarInt(new BigInteger("130"));
        ys.setVarString("NESTED Cheerio");

        NestedStruct yOrig = new NestedStruct();
        yOrig.setVarFloat(new BigDecimal("1.414"));
        yOrig.setVarInt(13);
        yOrig.setVarString("Cheerio");
View Full Code Here

Examples of org.apache.type_test.types1.SimpleStruct

        yOrig.setAttrString2("DerivedAttr2-y");

        Holder<SimpleStruct> y = new Holder<SimpleStruct>(yOrig);
        Holder<SimpleStruct> z = new Holder<SimpleStruct>();

        SimpleStruct ret;
        if (testDocLiteral) {
            ret = docClient.testSimpleStruct(x, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testSimpleStruct(x, y, z);
        } else {
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.