cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jav...@apache.org
Subject svn commit: r1502981 - /cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/tika/TikaGeneratorTestCase.java
Date Sun, 14 Jul 2013 14:30:29 GMT
Author: javier
Date: Sun Jul 14 14:30:29 2013
New Revision: 1502981

URL: http://svn.apache.org/r1502981
Log:
COCOON3-128: compare similar not identical XML files as elements order does not matter.

Modified:
    cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/tika/TikaGeneratorTestCase.java

Modified: cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/tika/TikaGeneratorTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/tika/TikaGeneratorTestCase.java?rev=1502981&r1=1502980&r2=1502981&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/tika/TikaGeneratorTestCase.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/tika/TikaGeneratorTestCase.java
Sun Jul 14 14:30:29 2013
@@ -20,6 +20,7 @@ import org.apache.cocoon.sax.SAXPipeline
 import org.apache.cocoon.sax.component.XMLSerializer;
 import org.custommonkey.xmlunit.DetailedDiff;
 import org.custommonkey.xmlunit.Diff;
+import org.custommonkey.xmlunit.ElementNameAndAttributeQualifier;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
@@ -74,7 +75,7 @@ public class TikaGeneratorTestCase {
         InputSource testSource = new InputSource(new FileInputStream(testFile));
         DetailedDiff diff = new DetailedDiff(
                 new Diff(controlSource, testSource));
-        List allDifferences = diff.getAllDifferences();
-        assertEquals(diff.toString(), 0, allDifferences.size());
+        diff.overrideElementQualifier(new ElementNameAndAttributeQualifier());
+        assertTrue(diff.toString(), diff.similar());
     }
 }



Mime
View raw message