[Jiemamy-notify:1393] commit [2633] XMLの比較にxmlunitを導入。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 2月 8日 (日) 21:55:29 JST


Revision: 2633
          http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2633
Author:   daisuke_m
Date:     2009-02-08 21:55:29 +0900 (Sun, 08 Feb 2009)

Log Message:
-----------
XMLの比較にxmlunitを導入。

Modified Paths:
--------------
    artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/serializer/SerializationTest.java


-------------- next part --------------
Modified: artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/serializer/SerializationTest.java
===================================================================
--- artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/serializer/SerializationTest.java	2009-02-08 12:48:33 UTC (rev 2632)
+++ artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/serializer/SerializationTest.java	2009-02-08 12:55:29 UTC (rev 2633)
@@ -38,6 +38,7 @@
 import org.apache.commons.jxpath.JXPathContext;
 import org.apache.commons.lang.CharEncoding;
 import org.apache.commons.lang.ClassUtils;
+import org.custommonkey.xmlunit.DetailedDiff;
 import org.custommonkey.xmlunit.Diff;
 import org.junit.After;
 import org.junit.Before;
@@ -251,7 +252,8 @@
 		FileUtils.writeStringToFile(new File("./target/" + ClassUtils.getShortClassName(this.getClass())
 				+ "_test1_gtree2.txt"), EqualsUtil.leftGTree, CharEncoding.UTF_8);
 		
-		assertThat(new Diff(xml1, xml2).similar(), is(true));
+		DetailedDiff diff = new DetailedDiff(new Diff(xml1, xml2));
+		assertThat(diff.getAllDifferences().toString(), diff.similar(), is(true));
 		assertEquals(EqualsUtil.rightGTree, EqualsUtil.leftGTree);
 	}
 	
@@ -296,7 +298,8 @@
 		FileUtils.writeStringToFile(new File("./target/" + ClassUtils.getShortClassName(this.getClass())
 				+ "_test2_gtree2.txt"), EqualsUtil.leftGTree, CharEncoding.UTF_8);
 		
-		assertThat(new Diff(xml1, xml2).similar(), is(true));
+		DetailedDiff diff = new DetailedDiff(new Diff(xml1, xml2));
+		assertThat(diff.getAllDifferences().toString(), diff.similar(), is(true));
 		assertEquals(EqualsUtil.rightGTree, EqualsUtil.leftGTree);
 	}
 	



Jiemamy-notify メーリングリストの案内
Back to archive index