use of com.hack23.cia.service.external.common.impl.test.SimpleXml in project cia by Hack23.
the class XmlAgentImplITest method unmarshallXmlMissingNamespaceSuccessTest.
/**
* Unmarshall xml missing namespace success test.
*
* @throws XmlAgentException
* the xml agent exception
*/
@Test
public void unmarshallXmlMissingNamespaceSuccessTest() throws XmlAgentException {
final Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller();
jaxb2Marshaller.setClassesToBeBound(SimpleXml.class);
final SimpleXml simpleXml = (SimpleXml) xmlAgent.unmarshallXml(jaxb2Marshaller, XmlAgentImplITest.class.getResource("/simplexml-missing-namespace.xml").toString(), "com.hack23.cia.service.external.common.impl.test", null, null);
assertEquals(new SimpleXml("abc123"), simpleXml);
}
use of com.hack23.cia.service.external.common.impl.test.SimpleXml in project cia by Hack23.
the class XmlAgentImplITest method unmarshallXmlSuccessTest.
/**
* Unmarshall xml success test.
*
* @throws XmlAgentException
* the xml agent exception
*/
@Test
public void unmarshallXmlSuccessTest() throws XmlAgentException {
final Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller();
jaxb2Marshaller.setClassesToBeBound(SimpleXml.class);
final SimpleXml simpleXml = (SimpleXml) xmlAgent.unmarshallXml(jaxb2Marshaller, XmlAgentImplITest.class.getResource("/simplexml.xml").toString());
assertEquals(new SimpleXml("abc123"), simpleXml);
}
use of com.hack23.cia.service.external.common.impl.test.SimpleXml in project cia by Hack23.
the class XmlAgentImplITest method unmarshallXmlMissingNamespaceAndReplaceSuccessTest.
/**
* Unmarshall xml missing namespace and replace success test.
*
* @throws XmlAgentException
* the xml agent exception
*/
@Test
public void unmarshallXmlMissingNamespaceAndReplaceSuccessTest() throws XmlAgentException {
final Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller();
jaxb2Marshaller.setClassesToBeBound(SimpleXml.class);
final SimpleXml simpleXml = (SimpleXml) xmlAgent.unmarshallXml(jaxb2Marshaller, XmlAgentImplITest.class.getResource("/simplexml-missing-namespace.xml").toString(), "com.hack23.cia.service.external.common.impl.test", "abc123", "ABC123");
assertEquals(new SimpleXml("ABC123"), simpleXml);
}
Aggregations