use of org.jbpm.compiler.xml.compiler.XmlDumper in project kogito-runtimes by kiegroup.
the class DumperTestHelper method XmlFile.
public static void XmlFile(String filename) throws Exception {
SemanticKnowledgeBuilderConfigurationImpl conf = new SemanticKnowledgeBuilderConfigurationImpl();
XmlPackageReader xmlPackageReader = new XmlPackageReader(conf.getSemanticModules());
xmlPackageReader.getParser().setClassLoader(DumperTestHelper.class.getClassLoader());
xmlPackageReader.read(new InputStreamReader(DumperTestHelper.class.getResourceAsStream(filename)));
final PackageDescr pkgOriginal = xmlPackageReader.getPackageDescr();
final XmlDumper dumper = new XmlDumper();
final String result = dumper.dump(pkgOriginal);
String buffer = readFile(filename);
System.out.println(buffer);
System.out.println(result);
assertThat(buffer).isEqualToIgnoringWhitespace(result);
assertThat(result).isNotNull();
}
Aggregations