use of org.apache.cxf.aegis.Context in project cxf by apache.
the class SoapArrayTypeTest method testSimpleArray.
@Test
public void testSimpleArray() throws Exception {
Context context = getContext();
// xsd:int[2]
ElementReader reader = new ElementReader(getClass().getResourceAsStream("arraySimple.xml"));
int[] numbers = (int[]) createArrayType(int[].class).readObject(reader, context);
reader.getXMLStreamReader().close();
assertArrayEquals(new int[] { 3, 4 }, numbers);
// round trip tests
numbers = readWriteReadRef("arraySimple.xml", int[].class);
assertArrayEquals(new int[] { 3, 4 }, numbers);
}
Aggregations