Package org.objectweb.type_test.types3

Examples of org.objectweb.type_test.types3.ObjectFactory


            return y.getSg04NillableBaseElementA() == null;
        }
    }
   
    public void testChoiceWithSubstitutionGroupNil() throws Exception {
        ObjectFactory objectFactory = new ObjectFactory();
       
        ChoiceWithSubstitutionGroupNil x = new ChoiceWithSubstitutionGroupNil();
        JAXBElement<BigInteger> varInt =
            objectFactory.createChoiceWithSubstitutionGroupNilVarInt(null);
        x.setVarInt(varInt);
        ChoiceWithSubstitutionGroupNil yOrig = new ChoiceWithSubstitutionGroupNil();
        JAXBElement<? extends SgBaseTypeA> elementA =
            objectFactory.createSg04NillableBaseElementA(null);
        yOrig.setSg04NillableBaseElementA(elementA);

        Holder<ChoiceWithSubstitutionGroupNil> y = new Holder<ChoiceWithSubstitutionGroupNil>(yOrig);
        Holder<ChoiceWithSubstitutionGroupNil> z = new Holder<ChoiceWithSubstitutionGroupNil>();
        ChoiceWithSubstitutionGroupNil ret;
View Full Code Here


    public void testChoiceWithSubstitutionGroup() throws Exception {
        SgBaseTypeA baseA = new SgBaseTypeA();
        baseA.setVarInt(new BigInteger("1"));

        ObjectFactory objectFactory = new ObjectFactory();
        JAXBElement<? extends SgBaseTypeA> elementA = objectFactory.createSg01BaseElementA(baseA);

        SgDerivedTypeB derivedB = new SgDerivedTypeB();
        derivedB.setVarInt(new BigInteger("32"));
        derivedB.setVarString("SgDerivedTypeB");

        JAXBElement<? extends SgBaseTypeA> elementB = objectFactory.createSg01DerivedElementB(derivedB);

        ChoiceWithSubstitutionGroup x = new ChoiceWithSubstitutionGroup();
        x.setSg01BaseElementA(elementA);
        ChoiceWithSubstitutionGroup yOrig = new ChoiceWithSubstitutionGroup();
        yOrig.setSg01BaseElementA(elementB);
View Full Code Here

        return equalsFloatIntStringList(x.getVarFloatOrVarIntOrVarString(),
                                        y.getVarFloatOrVarIntOrVarString());
    }
   
    public void testOccuringChoice() throws Exception {
        OccuringChoice x = new OccuringChoice();
        List<Serializable> theList = x.getVarFloatOrVarIntOrVarString();
        theList.add(0);
        theList.add(1.14f);
        theList.add("x1");
        theList.add(1);
        theList.add(11.14f);
        x.setVarAttrib("x_attr");

        OccuringChoice yOriginal = new OccuringChoice();
        theList = yOriginal.getVarFloatOrVarIntOrVarString();
        theList.add(3.14f);
        theList.add("y");
        theList.add(42);
        yOriginal.setVarAttrib("y_attr");

        Holder<OccuringChoice> y = new Holder<OccuringChoice>(yOriginal);
        Holder<OccuringChoice> z = new Holder<OccuringChoice>();

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

        }
        return true;
    }
   
    public void testOccuringChoice1() throws Exception {
        OccuringChoice1 x = new OccuringChoice1();
        List<Comparable> theList = x.getVarFloatOrVarInt();
        theList.add(0);
        theList.add(new Float(1.14f));
        theList.add(1);
        theList.add(new Float(11.14f));
        // leave y empty
        OccuringChoice1 yOriginal = new OccuringChoice1();

        Holder<OccuringChoice1> y = new Holder<OccuringChoice1>(yOriginal);
        Holder<OccuringChoice1> z = new Holder<OccuringChoice1>();

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

        }
        return true;
    }

    public void testOccuringChoice2() throws Exception {
        OccuringChoice2 x = new OccuringChoice2();
        x.setVarString("x1");
        OccuringChoice2 yOriginal = new OccuringChoice2();
        yOriginal.setVarString("y1");
        Holder<OccuringChoice2> y = new Holder<OccuringChoice2>(yOriginal);
        Holder<OccuringChoice2> z = new Holder<OccuringChoice2>();
        OccuringChoice2 ret;
        if (testDocLiteral) {
            ret = docClient.testOccuringChoice2(x, y, z);
        } else {
            ret = rpcClient.testOccuringChoice2(x, y, z);
        }

        if (!perfTestOnly) {
            assertTrue("testOccuringChoice2(): Incorrect value for inout param",
                       equals(x, y.value));
            assertTrue("testOccuringChoice2(): Incorrect value for out param",
                       equals(yOriginal, z.value));
            assertTrue("testOccuringChoice2(): Incorrect return value",
                       equals(x, ret));
        }

        x = new OccuringChoice2();
        yOriginal = new OccuringChoice2();
        yOriginal.setVarString("y1");
        y = new Holder<OccuringChoice2>(yOriginal);
        z = new Holder<OccuringChoice2>();
        if (testDocLiteral) {
            ret = docClient.testOccuringChoice2(x, y, z);
View Full Code Here

        }
        return true;
    }
   
    public void testOccuringStruct() throws Exception {
        OccuringStruct x = new OccuringStruct();
        List<Serializable> theList = x.getVarFloatAndVarIntAndVarString();
        theList.add(1.14f);
        theList.add(new Integer(0));
        theList.add("x1");
        theList.add(11.14f);
        theList.add(new Integer(1));
        theList.add("x2");
        x.setVarAttrib("x_attr");

        OccuringStruct yOriginal = new OccuringStruct();
        theList = yOriginal.getVarFloatAndVarIntAndVarString();
        theList.add(3.14f);
        theList.add(new Integer(42));
        theList.add("y");
        yOriginal.setVarAttrib("y_attr");

        Holder<OccuringStruct> y = new Holder<OccuringStruct>(yOriginal);
        Holder<OccuringStruct> z = new Holder<OccuringStruct>();

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

        return equalsFloatIntStringList(x.getVarFloatAndVarIntAndVarString(),
                                        y.getVarFloatAndVarIntAndVarString());
    }
   
    public void testOccuringStruct1() throws Exception {
        OccuringStruct1 x = new OccuringStruct1();
        List<Serializable> theList = x.getVarFloatAndVarIntAndVarString();
        theList.add(1.1f);
        theList.add(2);
        theList.add("xX");

        OccuringStruct1 yOriginal = new OccuringStruct1();
        theList = yOriginal.getVarFloatAndVarIntAndVarString();
        theList.add(11.11f);
        theList.add(22);
        theList.add("yY");

        Holder<OccuringStruct1> y = new Holder<OccuringStruct1>(yOriginal);
        Holder<OccuringStruct1> z = new Holder<OccuringStruct1>();

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

        }
        return true;
    }

    public void testOccuringStruct2() throws Exception {
        OccuringStruct2 x = new OccuringStruct2();
        x.setVarFloat(1.14f);
        List<Serializable> theList = x.getVarIntAndVarString();
        theList.add(0);
        theList.add("x1");
        theList.add(1);
        theList.add("x2");

        OccuringStruct2 yOriginal = new OccuringStruct2();
        yOriginal.setVarFloat(3.14f);
        theList = yOriginal.getVarIntAndVarString();
        theList.add(42);
        theList.add("the answer");
        theList.add(6);
        theList.add("hammer");
        theList.add(2);
        theList.add("anvil");

        Holder<OccuringStruct2> y = new Holder<OccuringStruct2>(yOriginal);
        Holder<OccuringStruct2> z = new Holder<OccuringStruct2>();

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

    }

    public void testRecElType() throws Exception {
        RecElType x = new RecElType();
        RecElType y = new RecElType();
        RecElNextType xn = new RecElNextType();
        RecElNextType yn = new RecElNextType();

        y.setVarInt(123);
        y.setRecElNext(yn);

        xn.getRecEl().add(y);
View Full Code Here

        return x.getVarInt() == y.getVarInt()
            && equals(x.getRecElNext(), y.getRecElNext());
    }

    public void testRecElType() throws Exception {
        RecElType x = new RecElType();
        RecElType y = new RecElType();
        RecElNextType xn = new RecElNextType();
        RecElNextType yn = new RecElNextType();

        y.setVarInt(123);
        y.setRecElNext(yn);

        xn.getRecEl().add(y);
        x.setVarInt(456);
        x.setRecElNext(xn);

        Holder<RecElType> yh = new Holder<RecElType>(y);
        Holder<RecElType> zh = new Holder<RecElType>();
        RecElType ret;
        if (testDocLiteral) {
            ret = docClient.testRecElType(x, yh, zh);
        } else {
            ret = rpcClient.testRecElType(x, yh, zh);
        }
View Full Code Here

TOP

Related Classes of org.objectweb.type_test.types3.ObjectFactory

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.