use of org.apache.type_test.types1.DerivedChoiceBaseArray in project cxf by apache.
the class AbstractTypeTestClient3 method testDerivedChoiceBaseArray.
@Test
public void testDerivedChoiceBaseArray() throws Exception {
if (!shouldRunTest("DerivedChoiceBaseArray")) {
return;
}
DerivedChoiceBaseArray x = new DerivedChoiceBaseArray();
// Base
x.getItem().addAll(Arrays.asList("AAA", "BBB", "CCC"));
// Derived
x.setVarStringExt("DerivedChoice-x");
x.setAttrStringExt("DerivedAttr-x");
DerivedChoiceBaseArray yOrig = new DerivedChoiceBaseArray();
// Base
yOrig.getItem().addAll(Arrays.asList("XXX", "YYY", "ZZZ"));
// Derived
yOrig.setVarFloatExt(1.414f);
yOrig.setAttrStringExt("DerivedAttr-y");
Holder<DerivedChoiceBaseArray> y = new Holder<DerivedChoiceBaseArray>(yOrig);
Holder<DerivedChoiceBaseArray> z = new Holder<DerivedChoiceBaseArray>();
DerivedChoiceBaseArray ret;
if (testDocLiteral) {
ret = docClient.testDerivedChoiceBaseArray(x, y, z);
} else if (testXMLBinding) {
ret = xmlClient.testDerivedChoiceBaseArray(x, y, z);
} else {
ret = rpcClient.testDerivedChoiceBaseArray(x, y, z);
}
if (!perfTestOnly) {
assertTrue("testDerivedChoiceBaseArray(): Incorrect value for inout param", equals(x, y.value));
assertTrue("testDerivedChoiceBaseArray(): Incorrect value for out param", equals(yOrig, z.value));
assertTrue("testDerivedChoiceBaseArray(): Incorrect return value", equals(ret, x));
}
}
use of org.apache.type_test.types1.DerivedChoiceBaseArray in project cxf by apache.
the class AbstractTypeTestClient4 method testInheritanceUnboundedArrayDerivedChoice.
@Test
public void testInheritanceUnboundedArrayDerivedChoice() throws Exception {
if (!shouldRunTest("InheritanceUnboundedArrayDerivedChoice")) {
return;
}
DerivedChoiceBaseArray x = new DerivedChoiceBaseArray();
// Base
x.getItem().addAll(Arrays.asList("AAA", "BBB", "CCC"));
// Derived
x.setVarStringExt("DerivedChoice-x");
x.setAttrStringExt("DerivedAttr-x");
DerivedChoiceBaseArray yOrig = new DerivedChoiceBaseArray();
// Base
yOrig.getItem().addAll(Arrays.asList("XXX", "YYY", "ZZZ"));
// Derived
yOrig.setVarFloatExt(1.414f);
yOrig.setAttrStringExt("DerivedAttr-y");
Holder<UnboundedArray> y = new Holder<UnboundedArray>(yOrig);
Holder<UnboundedArray> z = new Holder<UnboundedArray>();
UnboundedArray ret;
if (testDocLiteral) {
ret = docClient.testUnboundedArray(x, y, z);
} else if (testXMLBinding) {
ret = xmlClient.testUnboundedArray(x, y, z);
} else {
ret = rpcClient.testUnboundedArray(x, y, z);
}
if (!perfTestOnly) {
assertTrue("testInheritanceUnboundedArrayDerivedChoice(): Incorrect value for inout param", equals(x, (DerivedChoiceBaseArray) y.value));
assertTrue("testInheritanceUnboundedArrayDerivedChoice(): Incorrect value for out param", equals(yOrig, (DerivedChoiceBaseArray) z.value));
assertTrue("testInheritanceUnboundedArrayDerivedChoice(): Incorrect return value", equals(x, (DerivedChoiceBaseArray) ret));
}
}
Aggregations