ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chen...@apache.org
Subject svn commit: r1454538 - /incubator/ctakes/trunk/ctakes-regression-test/src/test/java/org/apache/ctakes/regression/test/RegressionPipelineTest.java
Date Fri, 08 Mar 2013 20:42:23 GMT
Author: chenpei
Date: Fri Mar  8 20:42:23 2013
New Revision: 1454538

URL: http://svn.apache.org/r1454538
Log:
CTAKES-84 - During the XMLDiff in XMLUnit, need to handle that the xcas's elements and attributes
could be in different order, but they should be treated as similar.  Use ElementNameAndAttributeQualifier()
per doc: http://xmlunit.sourceforge.net/userguide/html/ar01s03.html#ElementQualifier

Modified:
    incubator/ctakes/trunk/ctakes-regression-test/src/test/java/org/apache/ctakes/regression/test/RegressionPipelineTest.java

Modified: incubator/ctakes/trunk/ctakes-regression-test/src/test/java/org/apache/ctakes/regression/test/RegressionPipelineTest.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-regression-test/src/test/java/org/apache/ctakes/regression/test/RegressionPipelineTest.java?rev=1454538&r1=1454537&r2=1454538&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-regression-test/src/test/java/org/apache/ctakes/regression/test/RegressionPipelineTest.java
(original)
+++ incubator/ctakes/trunk/ctakes-regression-test/src/test/java/org/apache/ctakes/regression/test/RegressionPipelineTest.java
Fri Mar  8 20:42:23 2013
@@ -35,8 +35,7 @@ import org.apache.uima.collection.Status
 import org.apache.uima.collection.metadata.CpeDescription;
 import org.apache.uima.util.XMLInputSource;
 import org.custommonkey.xmlunit.Diff;
-import org.custommonkey.xmlunit.ElementNameAndTextQualifier;
-import org.custommonkey.xmlunit.IgnoreTextAndAttributeValuesDifferenceListener;
+import org.custommonkey.xmlunit.ElementNameAndAttributeQualifier;
 import org.custommonkey.xmlunit.XMLTestCase;
 import org.junit.Assert;
 import org.junit.Test;
@@ -131,15 +130,11 @@ public class RegressionPipelineTest exte
 				expected.normalizeDocument();
 
 				Diff myDiff = new Diff(expected, generated);
-				// Only Testing the skeleton because the xml attributes in the
-				// xcas could be in different Ordering
-				//myDiff.overrideElementQualifier(new ElementNameAndTextQualifier());
+				// Elment and attributes in the xcas could be in different Ordering
+				myDiff.overrideElementQualifier(new ElementNameAndAttributeQualifier());
 				//myDiff.overrideDifferenceListener(new IgnoreTextAndAttributeValuesDifferenceListener());
 				assertTrue("Verifying Test Output: " + file.getName() + myDiff,
 						myDiff.similar());
-				// assertXMLEqual("Verifying Test Output: " + file.getName(),
-				// myDiff, true);				
-
 			}
 		}
 	}



Mime
View raw message