Adam R. B. Jack wrote:
+depend project=xmlunit/
Cool, but what does it do what do we use it for? Just curious.
JUnit asserts for XML
I use it to assert that the XML content of two files are equal.
Like this.
/**
* Test the exporting of cached set test1.
*
*/
public void testExport1() throws FileNotFoundException, SAXException,
IOException, ParserConfigurationException {
try {
executeTarget(testExport1);
File generatedFile = new File(build/test1-export.build.xml);
File expectedFile = new File(
src/test/org/apache/depot/update/ant/test1-export.build.xml);
assertTrue(Expected + generatedFile + to exists,
generatedFile.exists());
XMLAssert
.assertXMLEqual(Exported cached set test1,
new FileReader(expectedFile), new FileReader(
generatedFile));
} finally {
System.out.println(getOutput());
}
}