Package org.objectweb.type_test.types1

Examples of org.objectweb.type_test.types1.DerivedStructBaseStruct


        yOrig.setAttrString("DerivedAttr-y");

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

        SimpleChoice ret;
        if (testDocLiteral) {
            ret = docClient.testSimpleChoice(x, y, z);
            // XXX - rpc-literal returns an object of type SimpleChoice,
            //       doc-literal returns an object of type
            //       DerivedStructBaseChoice
View Full Code Here


            return false;
        }
    }

    public void testSimpleChoice() throws Exception {
        SimpleChoice x = new SimpleChoice();
        x.setVarFloat(-3.14f);
        SimpleChoice yOrig = new SimpleChoice();
        yOrig.setVarString("Cheerio");

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

        SimpleChoice ret;
        if (testDocLiteral) {
            ret = docClient.testSimpleChoice(x, y, z);
        } else {
            ret = rpcClient.testSimpleChoice(x, y, z);
        }
View Full Code Here

        assertEquals(msg, x.getAttrib1B(), y.getAttrib1B());
        assertEquals(msg, x.getValue(), y.getValue());
    }

    public void testSimpleContent1() throws Exception {
        SimpleContent1 x1 = new SimpleContent1();
        x1.setValue("foo");
        x1.setAttrib1A(new Byte((byte)1));
        x1.setAttrib1B(new Short((short)2));

        SimpleContent1 y1 = new SimpleContent1();
        y1.setValue("bar");
        y1.setAttrib1A(new Byte((byte)3));
        y1.setAttrib1B(new Short((short)4));

        Holder<SimpleContent1> y1Holder = new Holder<SimpleContent1>(y1);
        Holder<SimpleContent1> z1 = new Holder<SimpleContent1>();
        SimpleContent1 ret;
        if (testDocLiteral) {
            ret = docClient.testSimpleContent1(x1, y1Holder, z1);
        } else {
            ret = rpcClient.testSimpleContent1(x1, y1Holder, z1);
        }
View Full Code Here

        assertEquals(msg, x.getAttrib2B(), y.getAttrib2B());
        equals(msg, (SimpleContent1)x, (SimpleContent1)y);
    }

    public void testSimpleContent2() throws Exception {
        SimpleContent2 x2 = new SimpleContent2();
        x2.setValue("foo");
        x2.setAttrib1A(new Byte((byte)1));
        x2.setAttrib1B(new Short((short)2));
        x2.setAttrib2A(new Integer(5));
        x2.setAttrib2B(new Long(6));

        SimpleContent2 y2 = new SimpleContent2();
        y2.setValue("bar");
        y2.setAttrib1A(new Byte((byte)3));
        y2.setAttrib1B(new Short((short)4));
        y2.setAttrib2A(new Integer(7));
        y2.setAttrib2B(new Long(8));

        Holder<SimpleContent2> y2Holder = new Holder<SimpleContent2>(y2);
        Holder<SimpleContent2> z2 = new Holder<SimpleContent2>();
        SimpleContent2 ret;
        if (testDocLiteral) {
            ret = docClient.testSimpleContent2(x2, y2Holder, z2);
        } else {
            ret = rpcClient.testSimpleContent2(x2, y2Holder, z2);
        }
View Full Code Here

        assertEquals(msg, x.isAttrib3B(), y.isAttrib3B());
        equals(msg, (SimpleContent2)x, (SimpleContent2)y);
    }

    public void testSimpleContent3() throws Exception {
        SimpleContent3 x3 = new SimpleContent3();
        x3.setValue("foo");
        x3.setAttrib1A(new Byte((byte)1));
        x3.setAttrib1B(new Short((short)2));
        x3.setAttrib2A(new Integer(5));
        x3.setAttrib2B(new Long(6));
        x3.setAttrib3A("xxx");
        x3.setAttrib3B(Boolean.TRUE);

        SimpleContent3 y3 = new SimpleContent3();
        y3.setValue("bar");
        y3.setAttrib1A(new Byte((byte)3));
        y3.setAttrib1B(new Short((short)4));
        y3.setAttrib2A(new Integer(7));
        y3.setAttrib2B(new Long(8));
        y3.setAttrib3A("yyy");
        y3.setAttrib3B(Boolean.FALSE);

        Holder<SimpleContent3> y3Holder = new Holder<SimpleContent3>(y3);
        Holder<SimpleContent3> z3 = new Holder<SimpleContent3>();
        SimpleContent3 ret;
        if (testDocLiteral) {
            ret = docClient.testSimpleContent3(x3, y3Holder, z3);
        } else {
            ret = rpcClient.testSimpleContent3(x3, y3Holder, z3);
        }
View Full Code Here

        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);
            // XXX - rpc-literal returns an object of type SimpleStruct,
            //       doc-literal returns an object of type
            //       DerivedStructBaseStruct
View Full Code Here

            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

            && (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;
        if (testDocLiteral) {
            ret = docClient.testSimpleStruct(x, y, z);
        } else {
            ret = rpcClient.testSimpleStruct(x, y, z);
        }
View Full Code Here

        String[] xx = {"a b c", "d e f", "g h i"};
        String[] yy = {"g h i", "a b c", "d e f"};

        Holder<StringEnum> z = new Holder<StringEnum>();
        for (int i = 0; i < 3; i++) {
            StringEnum x = StringEnum.fromValue(xx[i]);
            StringEnum yOrig = StringEnum.fromValue(yy[i]);
            Holder<StringEnum> y = new Holder<StringEnum>(yOrig);

            StringEnum ret;
            if (testDocLiteral) {
                ret = docClient.testStringEnum(x, y, z);
            } else {
                ret = rpcClient.testStringEnum(x, y, z);
            }
            if (!perfTestOnly) {
                assertEquals("testStringEnum(): Incorrect value for inout param",
                             x.value(), y.value.value());
                assertEquals("testStringEnum(): Incorrect value for out param",
                             yOrig.value(), z.value.value());
                assertEquals("testStringEnum(): Incorrect return value",
                             x.value(), ret.value());
            }
        }
    }
View Full Code Here

            }
        }
    }

    public void testStructWithList() throws Exception {
        StructWithList x = new StructWithList();
        x.getVarList().add("I");
        x.getVarList().add("am");
        x.getVarList().add("StructWithList");

        StructWithList yOrig = new StructWithList();
        yOrig.getVarList().add("Does");
        yOrig.getVarList().add("StructWithList");
        yOrig.getVarList().add("work");

        Holder<StructWithList> y = new Holder<StructWithList>(yOrig);
        Holder<StructWithList> z = new Holder<StructWithList>();
        StructWithList ret;
        if (testDocLiteral) {
            ret = docClient.testStructWithList(x, y, z);
        } else {
            ret = rpcClient.testStructWithList(x, y, z);
        }
View Full Code Here

TOP

Related Classes of org.objectweb.type_test.types1.DerivedStructBaseStruct

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.