These tests all fail:
public void testSiblingOrderIdentity()
throws SAXException, IOException, ParserConfigurationException {
String expected = "<a><x/><y/></a>";
String actual = "<a><y/><x/></a>";
Diff diff = new Diff(expected, actual);
assertTrue(diff.identical());
}
public void testNamespacePrefixIdentity()
throws SAXException, IOException, ParserConfigurationException {
String expected = "<a xmlns='http://www.example.org'><x/></a>";
String actual = "<pre:a xmlns:pre='http://www.example.org'><pre:x/></pre:a>";
Diff diff = new Diff(expected, actual);
assertTrue(diff.identical());
}
public void testDOCTYPEIdentity()
throws SAXException, IOException, ParserConfigurationException {
String expected = "<!DOCTYPE a [<!ATTLIST a b CDATA 'test'>]>\n" +
"<a><x/></a>";
String actual = "<a b='test'><x/></a>";
Diff diff = new Diff(expected, actual);
assertTrue(diff.identical());
}
Beware assertXMLIdentical
. It's at least confusing and possibly exactly backwards.