Search in sources :

Example 6 with SgBaseTypeA

use of org.apache.type_test.types3.SgBaseTypeA in project cxf by apache.

the class AbstractTypeTestClient2 method equals.

// org.apache.type_test.types3.ChoiceWithSubstitutionGroupAbstract
protected boolean equals(ChoiceWithSubstitutionGroupAbstract x, ChoiceWithSubstitutionGroupAbstract y) {
    if (x.getVarInt() != null && y.getVarInt() != null && x.getVarInt().equals(y.getVarInt())) {
        return true;
    }
    if (!x.getSg03AbstractBaseElementA().isNil() && !y.getSg03AbstractBaseElementA().isNil()) {
        SgBaseTypeA xTypeA = x.getSg03AbstractBaseElementA().getValue();
        SgBaseTypeA yTypeA = y.getSg03AbstractBaseElementA().getValue();
        return equals(xTypeA, yTypeA);
    }
    return false;
}
Also used : SgBaseTypeA(org.apache.type_test.types3.SgBaseTypeA)

Example 7 with SgBaseTypeA

use of org.apache.type_test.types3.SgBaseTypeA in project cxf by apache.

the class AbstractTypeTestClient2 method testStructWithSubstitutionGroupNil.

@Test
public void testStructWithSubstitutionGroupNil() throws Exception {
    if (!shouldRunTest("StructWithSubstitutionGroupNil")) {
        return;
    }
    StructWithSubstitutionGroupNil x = new StructWithSubstitutionGroupNil();
    ObjectFactory objectFactory = new ObjectFactory();
    JAXBElement<? extends SgBaseTypeA> element = objectFactory.createSg04NillableBaseElementA(null);
    x.setSg04NillableBaseElementA(element);
    StructWithSubstitutionGroupNil yOrig = new StructWithSubstitutionGroupNil();
    element = objectFactory.createSg04NillableBaseElementA(null);
    yOrig.setSg04NillableBaseElementA(element);
    Holder<StructWithSubstitutionGroupNil> y = new Holder<StructWithSubstitutionGroupNil>(yOrig);
    Holder<StructWithSubstitutionGroupNil> z = new Holder<StructWithSubstitutionGroupNil>();
    StructWithSubstitutionGroupNil ret;
    if (testDocLiteral) {
        ret = docClient.testStructWithSubstitutionGroupNil(x, y, z);
    } else if (testXMLBinding) {
        ret = xmlClient.testStructWithSubstitutionGroupNil(x, y, z);
    } else {
        ret = rpcClient.testStructWithSubstitutionGroupNil(x, y, z);
    }
    if (!perfTestOnly) {
        assertTrue("testStructWithSubstitutionGroupNil(): Incorrect value for inout param", equals(x, y.value));
        assertTrue("testStructWithSubstitutionGroupNil(): Incorrect value for out param", equals(yOrig, z.value));
        assertTrue("testStructWithSubstitutionGroupNil(): Incorrect return value", equals(x, ret));
    }
}
Also used : ObjectFactory(org.apache.type_test.types3.ObjectFactory) Holder(javax.xml.ws.Holder) StructWithSubstitutionGroupNil(org.apache.type_test.types3.StructWithSubstitutionGroupNil) Test(org.junit.Test)

Example 8 with SgBaseTypeA

use of org.apache.type_test.types3.SgBaseTypeA in project cxf by apache.

the class AbstractTypeTestClient2 method equals.

// org.apache.type_test.types3.StructWithSubstitutionGroupAbstract
protected boolean equals(StructWithSubstitutionGroupAbstract x, StructWithSubstitutionGroupAbstract y) {
    if (x.getSg03AbstractBaseElementA() != null && y.getSg03AbstractBaseElementA() != null) {
        SgBaseTypeA xTypeA = x.getSg03AbstractBaseElementA().getValue();
        SgBaseTypeA yTypeA = y.getSg03AbstractBaseElementA().getValue();
        return equals(xTypeA, yTypeA);
    }
    return false;
}
Also used : SgBaseTypeA(org.apache.type_test.types3.SgBaseTypeA)

Example 9 with SgBaseTypeA

use of org.apache.type_test.types3.SgBaseTypeA in project cxf by apache.

the class AbstractTypeTestClient2 method equals.

protected boolean equals(ChoiceWithSubstitutionGroup x, ChoiceWithSubstitutionGroup y) {
    if (x.getVarInt() != null && y.getVarInt() != null && x.getVarInt().compareTo(y.getVarInt()) == 0) {
        return true;
    }
    if (!x.getSg01BaseElementA().isNil() && !y.getSg01BaseElementA().isNil()) {
        SgBaseTypeA xTypeA = x.getSg01BaseElementA().getValue();
        SgBaseTypeA yTypeA = y.getSg01BaseElementA().getValue();
        return equals(xTypeA, yTypeA);
    }
    return false;
}
Also used : SgBaseTypeA(org.apache.type_test.types3.SgBaseTypeA)

Example 10 with SgBaseTypeA

use of org.apache.type_test.types3.SgBaseTypeA in project cxf by apache.

the class AbstractTypeTestClient2 method equals.

// org.apache.type_test.types3.StructWithSubstitutionGroup
protected boolean equals(StructWithSubstitutionGroup x, StructWithSubstitutionGroup y) {
    if (!x.getSg01BaseElementA().isNil() && !y.getSg01BaseElementA().isNil()) {
        SgBaseTypeA xTypeA = x.getSg01BaseElementA().getValue();
        SgBaseTypeA yTypeA = y.getSg01BaseElementA().getValue();
        return equals(xTypeA, yTypeA);
    }
    return false;
}
Also used : SgBaseTypeA(org.apache.type_test.types3.SgBaseTypeA)

Aggregations

SgBaseTypeA (org.apache.type_test.types3.SgBaseTypeA)7 Holder (javax.xml.ws.Holder)6 ObjectFactory (org.apache.type_test.types3.ObjectFactory)6 Test (org.junit.Test)6 BigInteger (java.math.BigInteger)5 SgDerivedTypeB (org.apache.type_test.types3.SgDerivedTypeB)5 SgDerivedTypeC (org.apache.type_test.types3.SgDerivedTypeC)3 ChoiceWithSubstitutionGroup (org.apache.type_test.types3.ChoiceWithSubstitutionGroup)1 ChoiceWithSubstitutionGroupAbstract (org.apache.type_test.types3.ChoiceWithSubstitutionGroupAbstract)1 ChoiceWithSubstitutionGroupNil (org.apache.type_test.types3.ChoiceWithSubstitutionGroupNil)1 StructWithMultipleSubstitutionGroups (org.apache.type_test.types3.StructWithMultipleSubstitutionGroups)1 StructWithSubstitutionGroup (org.apache.type_test.types3.StructWithSubstitutionGroup)1 StructWithSubstitutionGroupNil (org.apache.type_test.types3.StructWithSubstitutionGroupNil)1