Package org.custommonkey.xmlunit

Examples of org.custommonkey.xmlunit.DetailedDiff.overrideDifferenceListener()


  public static List<Difference> getDifferences(String controlDom, String testDom,
          final List<String> ignoreAttributes) {
    try {
      Diff d = new Diff(DomUtils.asDocument(controlDom), DomUtils.asDocument(testDom));
      DetailedDiff dd = new DetailedDiff(d);
      dd.overrideDifferenceListener(new DomDifferenceListener(ignoreAttributes));

      return dd.getAllDifferences();
    } catch (IOException e) {
      LOGGER.error("Error with getDifferences: " + e.getMessage(), e);
    }
View Full Code Here


  public static List<Difference> getDifferences(String controlDom, String testDom,
          final List<String> ignoreAttributes) {
    try {
      Diff d = new Diff(Helper.getDocument(controlDom), Helper.getDocument(testDom));
      DetailedDiff dd = new DetailedDiff(d);
      dd.overrideDifferenceListener(new DifferenceListener() {

        @Override
        public void skippedComparison(Node control, Node test) {
        }
View Full Code Here

  public static List<Difference> getDifferences(String controlDom, String testDom,
          final List<String> ignoreAttributes) {
    try {
      Diff d = new Diff(Helper.getDocument(controlDom), Helper.getDocument(testDom));
      DetailedDiff dd = new DetailedDiff(d);
      dd.overrideDifferenceListener(new DifferenceListener() {

        @Override
        public void skippedComparison(Node control, Node test) {
        }
View Full Code Here

            Diff diff = new Diff(new FileReader(fileToTest),
                    new InputStreamReader(new ByteArrayInputStream(baos
                            .toByteArray())));

            detaileddiffs = new DetailedDiff(diff);
            detaileddiffs.overrideDifferenceListener(new SchemaAttrDiff());
            boolean result = detaileddiffs.similar();
            if (!result && debug) printFailureDetail(schema, detaileddiffs);
            assertTrue("Serialized out schema not similar to original", result);
        } catch (Exception e) {
            if (this.valid) {
View Full Code Here

  public static List<Difference> getDifferences(String controlDom, String testDom,
          final List<String> ignoreAttributes) {
    try {
      Diff d = new Diff(Helper.getDocument(controlDom), Helper.getDocument(testDom));
      DetailedDiff dd = new DetailedDiff(d);
      dd.overrideDifferenceListener(new DifferenceListener() {

        @Override
        public void skippedComparison(Node control, Node test) {
        }
View Full Code Here

        String result = JaxbOpenejbJar2.marshal(GeronimoEjbJarType.class, root);
        String expected = readContent(getInputStream("geronimo-openejb-converted.xml"));

        Diff myDiff = new DetailedDiff(new Diff(expected, result));
        final AtomicInteger differenceNumber = new AtomicInteger(0); // just to get an int wrapper for the test
        myDiff.overrideDifferenceListener(new DifferenceListener() {
            @Override
            public int differenceFound(Difference difference) {
                if (!difference.isRecoverable()) {
                    differenceNumber.incrementAndGet();
                    System.err.println(">>> " + difference.toString());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.