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