Search in sources :

Example 6 with ElementNameAndAttributeQualifier

use of org.custommonkey.xmlunit.ElementNameAndAttributeQualifier in project cayenne by apache.

the class DbImporterMojoTest method verifyResult.

private void verifyResult(File map, File mapFileCopy) {
    try {
        FileReader control = new FileReader(map.getAbsolutePath() + "-result");
        FileReader test = new FileReader(mapFileCopy);
        Diff prototype = new Diff(control, test);
        prototype.overrideElementQualifier(new ElementNameAndAttributeQualifier());
        DetailedDiff diff = new DetailedDiff(prototype);
        if (!diff.similar()) {
            fail(diff.toString());
        }
    } catch (Exception e) {
        e.printStackTrace();
        fail();
    }
}
Also used : DetailedDiff(org.custommonkey.xmlunit.DetailedDiff) ElementNameAndAttributeQualifier(org.custommonkey.xmlunit.ElementNameAndAttributeQualifier) DetailedDiff(org.custommonkey.xmlunit.DetailedDiff) Diff(org.custommonkey.xmlunit.Diff) FileReader(java.io.FileReader) SQLException(java.sql.SQLException) IOException(java.io.IOException) MojoExecutionException(org.apache.maven.plugin.MojoExecutionException)

Aggregations

Diff (org.custommonkey.xmlunit.Diff)6 ElementNameAndAttributeQualifier (org.custommonkey.xmlunit.ElementNameAndAttributeQualifier)6 BufferedInputStream (java.io.BufferedInputStream)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 InputStream (java.io.InputStream)2 StringReader (java.io.StringReader)2 URL (java.net.URL)2 HashSet (java.util.HashSet)2 JAXBContext (javax.xml.bind.JAXBContext)2 Marshaller (javax.xml.bind.Marshaller)2 Unmarshaller (javax.xml.bind.Unmarshaller)2 Persistence (org.apache.openejb.jee.jpa.unit.Persistence)2 SemanticModules (org.drools.core.xml.SemanticModules)2 XmlProcessReader (org.jbpm.compiler.xml.XmlProcessReader)2 RuleFlowProcess (org.jbpm.ruleflow.core.RuleFlowProcess)2 Process (org.kie.api.definition.process.Process)2 FileReader (java.io.FileReader)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1