Package org.apache.type_test.types1

Examples of org.apache.type_test.types1.StructWithOptionals


            && (x.getVarInt() == y.getVarInt())
            && (x.getVarString().equals(y.getVarString()));
    }
   
    public void testAnonymousStruct() throws Exception {
        AnonymousStruct x = new AnonymousStruct();
        x.setVarInt(100);
        x.setVarString("hello");
        x.setVarFloat(1.1f);

        AnonymousStruct yOrig = new AnonymousStruct();
        yOrig.setVarInt(11);
        yOrig.setVarString("world");
        yOrig.setVarFloat(10.1f);

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

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


    @Test
    public void testAnonymousType() throws Exception {
        if (!shouldRunTest("AnonymousType")) {
            return;
        }
        AnonymousType x = new AnonymousType();
        AnonymousType.Foo fx = new AnonymousType.Foo();
        fx.setFoo("hello");
        fx.setBar("there");
        x.setFoo(fx);

        AnonymousType yOrig = new AnonymousType();
        AnonymousType.Foo fy = new AnonymousType.Foo();
        fy.setFoo("good");
        fy.setBar("bye");
        yOrig.setFoo(fy);

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

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

        String[] xx = {"http://www.iona.com", "http://www.google.com"};
        String[] yy = {"http://www.google.com", "http://www.iona.com"};

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

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

        String[] xx = {"http://www.iona.com", "http://www.google.com"};
        String[] yy = {"http://www.google.com", "http://www.iona.com"};

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

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

    }
   
    //org.apache.type_test.types1.BoundedArray
   
    public void testBoundedArray() throws Exception {
        BoundedArray x = new BoundedArray();
        x.getItem().addAll(Arrays.asList(-100.00f, 0f, 100.00f));
        BoundedArray yOrig = new BoundedArray();
        yOrig.getItem().addAll(Arrays.asList(-1f, 0f, 1f));

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

        if (!perfTestOnly) {
            float delta = 0.0f;

            int xSize = x.getItem().size();
            int ySize = y.value.getItem().size();
            int zSize = z.value.getItem().size();
            int retSize = ret.getItem().size();
            assertTrue("testBoundedArray() array size incorrect",
                       xSize == ySize && ySize == zSize && zSize == retSize && xSize == 3);
            for (int i = 0; i < xSize; i++) {
                assertEquals("testBoundedArray(): Incorrect value for inout param",
                             x.getItem().get(i), y.value.getItem().get(i), delta);
                assertEquals("testBoundedArray(): Incorrect value for out param",
                             yOrig.getItem().get(i), z.value.getItem().get(i), delta);
                assertEquals("testBoundedArray(): Incorrect return value",
                             x.getItem().get(i), ret.getItem().get(i), delta);
            }
        }
    }
View Full Code Here

        tmp1.setVarString("RecusiveUnion-1");
        RecursiveUnion tmp2 = new RecursiveUnion();
        tmp2.setVarString("RecusiveUnion-2");

        RecursiveUnionData xData = new RecursiveUnionData();
        ChoiceArray xChoice = new ChoiceArray();
        xChoice.getItem().add(tmp1);
        xChoice.getItem().add(tmp2);
        xData.setVarInt(5);
        xData.setVarChoiceArray(xChoice);

        RecursiveUnion x = new RecursiveUnion();
        x.setVarChoice(xData);

        RecursiveUnionData yData = new RecursiveUnionData();
        ChoiceArray yChoice = new ChoiceArray();
        yChoice.getItem().add(tmp1);
        yChoice.getItem().add(tmp2);
        yData.setVarInt(-5);
        yData.setVarChoiceArray(yChoice);

        RecursiveUnion yOrig = new RecursiveUnion();
        yOrig.setVarChoice(yData);
View Full Code Here

        tmp1.setVarString("RecusiveUnion-1");
        RecursiveUnion tmp2 = new RecursiveUnion();
        tmp2.setVarString("RecusiveUnion-2");

        RecursiveUnionData x = new RecursiveUnionData();
        ChoiceArray xChoice = new ChoiceArray();
        xChoice.getItem().add(tmp1);
        xChoice.getItem().add(tmp2);
        x.setVarInt(5);
        x.setVarChoiceArray(xChoice);

        RecursiveUnionData yOrig = new RecursiveUnionData();
        ChoiceArray yOrigchoice = new ChoiceArray();
        xChoice.getItem().add(tmp1);
        xChoice.getItem().add(tmp2);
        yOrig.setVarInt(-5);
        yOrig.setVarChoiceArray(yOrigchoice);
View Full Code Here

        RecursiveUnion tmp1 = new RecursiveUnion();
        tmp1.setVarString("RecusiveUnion-1");
        RecursiveUnion tmp2 = new RecursiveUnion();
        tmp2.setVarString("RecusiveUnion-2");

        ChoiceArray x = new ChoiceArray();
        x.getItem().add(tmp1);
        x.getItem().add(tmp2);
        ChoiceArray yOrig = new ChoiceArray();
        yOrig.getItem().add(tmp2);
        yOrig.getItem().add(tmp1);

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

        String[] yy = {"GREEN", "BLUE", "RED"};

        Holder<ColourEnum> z = new Holder<ColourEnum>();

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

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

        String[] yy = {"GREEN", "BLUE", "RED"};

        Holder<ColourEnum> z = new Holder<ColourEnum>();

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

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

TOP

Related Classes of org.apache.type_test.types1.StructWithOptionals

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.