use of io.atlasmap.xml.test.v2.XmlFlatBoxedPrimitiveAttribute in project atlasmap by atlasmap.
the class XmlXmlFlatMappingTest method testProcessXmlXmlBoxedFlatMappingPrimitiveElementToAttributeNS.
@Test
public void testProcessXmlXmlBoxedFlatMappingPrimitiveElementToAttributeNS() throws Exception {
AtlasContext context = atlasContextFactory.createContext(new File("src/test/resources/xmlToXml/atlasmapping-boxedflatprimitive-elementToAttribute-ns.xml"));
AtlasSession session = context.createSession();
String sourceXml = AtlasTestUtil.loadFileAsString("src/test/resources/xmlToXml/atlas-xml-boxedflatprimitive-element-ns.xml");
session.setDefaultSourceDocument(sourceXml);
context.process(session);
assertFalse(printAudit(session), session.hasErrors());
Object object = session.getDefaultTargetDocument();
assertNotNull(object);
assertTrue(object instanceof String);
JAXBElement<XmlFlatBoxedPrimitiveAttribute> xmlFPE = AtlasXmlTestHelper.unmarshal((String) object, XmlFlatBoxedPrimitiveAttribute.class);
AtlasTestUtil.validateXmlFlatPrimitiveBoxedPrimitiveAttributeFields(xmlFPE.getValue());
}
Aggregations