use of org.apache.type_test.types3.StructWithSubstitutionGroup in project cxf by apache.
the class AbstractTypeTestClient2 method testStructWithSubstitutionGroup.
@Test
public void testStructWithSubstitutionGroup() throws Exception {
if (!shouldRunTest("StructWithSubstitutionGroup")) {
return;
}
SgBaseTypeA baseA = new SgBaseTypeA();
baseA.setVarInt(new BigInteger("1"));
SgDerivedTypeB derivedB = new SgDerivedTypeB();
derivedB.setVarInt(new BigInteger("32"));
derivedB.setVarString("foo");
ObjectFactory objectFactory = new ObjectFactory();
StructWithSubstitutionGroup x = new StructWithSubstitutionGroup();
JAXBElement<? extends SgBaseTypeA> elementA = objectFactory.createSg01BaseElementA(baseA);
x.setSg01BaseElementA(elementA);
StructWithSubstitutionGroup yOrig = new StructWithSubstitutionGroup();
JAXBElement<? extends SgBaseTypeA> elementB = objectFactory.createSg01DerivedElementB(derivedB);
yOrig.setSg01BaseElementA(elementB);
Holder<StructWithSubstitutionGroup> y = new Holder<StructWithSubstitutionGroup>(yOrig);
Holder<StructWithSubstitutionGroup> z = new Holder<StructWithSubstitutionGroup>();
StructWithSubstitutionGroup ret;
if (testDocLiteral) {
ret = docClient.testStructWithSubstitutionGroup(x, y, z);
} else if (testXMLBinding) {
ret = xmlClient.testStructWithSubstitutionGroup(x, y, z);
} else {
ret = rpcClient.testStructWithSubstitutionGroup(x, y, z);
}
if (!perfTestOnly) {
assertTrue("testStructWithSubstitutionGroup(): Incorrect value for inout param", equals(x, y.value));
assertTrue("testStructWithSubstitutionGroup(): Incorrect value for out param", equals(yOrig, z.value));
assertTrue("testStructWithSubstitutionGroup(): Incorrect return value", equals(x, ret));
}
}
use of org.apache.type_test.types3.StructWithSubstitutionGroup 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;
}
Aggregations