use of com.thoughtworks.xstream.io.xml.QNameMap in project ddf by codice.
the class XstreamPathConverterTest method testGetFirstNodeValue.
@Test
public void testGetFirstNodeValue() throws XMLStreamException {
XMLStreamReader streamReader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(GML_XML));
HierarchicalStreamReader reader = new StaxReader(new QNameMap(), streamReader);
XstreamPathValueTracker pathValueTracker = (XstreamPathValueTracker) xstream.unmarshal(reader, null, argumentHolder);
assertThat(pathValueTracker.getFirstValue(POLYGON_POS_PATH), is("-180.000000 90.000000"));
}
use of com.thoughtworks.xstream.io.xml.QNameMap in project ddf by codice.
the class XstreamPathConverterTest method testNestedOfficeInfo.
@Test
public void testNestedOfficeInfo() throws XMLStreamException {
XMLStreamReader streamReader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(TEST2_XML));
HierarchicalStreamReader reader = new StaxReader(new QNameMap(), streamReader);
XstreamPathValueTracker pathValueTracker = (XstreamPathValueTracker) xstream.unmarshal(reader, null, argumentHolder);
assertThat(pathValueTracker.getAllValues(POC_PATH), hasItem(" Phone: 123-456-7890"));
}
Aggregations