Package org.custommonkey.xmlunit

Examples of org.custommonkey.xmlunit.IgnoreTextAndAttributeValuesDifferenceListener


    @Override
    protected DifferenceListener getDifferenceListener() {
        final String skipAttribute = "(jquery|sizcache)\\d*";

        return new IgnoreTextAndAttributeValuesDifferenceListener() {
            @Override
            public int differenceFound(Difference difference) {
                String controlNameAttribute = difference.getControlNodeDetail().getValue();
                String testNameAttribute = difference.getTestNodeDetail().getValue();
                if (controlNameAttribute.matches(skipAttribute) || testNameAttribute.matches(skipAttribute)) {
View Full Code Here


        final Diff diff = new Diff(expected.trim(), result.trim());
        final Diff myDiff = new DetailedDiff(diff);

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

        final Diff diff = new Diff(expected.trim(), result.trim());
        final Diff myDiff = new DetailedDiff(diff);

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

        // Elment and attributes in the xcas could be in different
        // Ordering
        // Match on the id attribute are the same
        // myDiff.overrideElementQualifier(new
        // ElementNameAndAttributeQualifier("id"));
        myDiff.overrideDifferenceListener(new IgnoreTextAndAttributeValuesDifferenceListener());
        assertTrue("Verifying Test Output: " + file.getName() + myDiff,
            myDiff.similar());
      }
    }
  }
View Full Code Here

    @Override
    protected DifferenceListener getDifferenceListener() {
        final String skipAttribute = "(jquery|sizcache)\\d*";

        return new IgnoreTextAndAttributeValuesDifferenceListener() {
            @Override
            public int differenceFound(Difference difference) {
                String controlNameAttribute = difference.getControlNodeDetail().getValue();
                String testNameAttribute = difference.getTestNodeDetail().getValue();
                if (controlNameAttribute.matches(skipAttribute) || testNameAttribute.matches(skipAttribute)) {
View Full Code Here

TOP

Related Classes of org.custommonkey.xmlunit.IgnoreTextAndAttributeValuesDifferenceListener

Copyright © 2018 www.massapicom. 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.