use of com.evolveum.midpoint.prism.impl.lex.dom.DomLexicalProcessor in project midpoint by Evolveum.
the class TestParseResource method testParseResourceDom.
// todo eliminate dependency on prism-impl
@Test
public void testParseResourceDom() throws Exception {
if (!"xml".equals(language)) {
return;
}
// GIVEN
PrismContext prismContext = getPrismContext();
// WHEN
DomLexicalProcessor parserDom = ((PrismContextImpl) prismContext).getParserDom();
RootXNode xnode = parserDom.read(new ParserFileSource(getFile(TestConstants.RESOURCE_FILE_BASENAME)), createDefaultParsingContext());
PrismObject<ResourceType> resource = prismContext.parserFor(xnode).parse();
// THEN
System.out.println("Parsed resource:");
System.out.println(resource.debugDump());
assertResource(resource, true, true, false);
}
Aggregations