XMLUnit 是否具有忽略空格的断言
我想在测试中比较两个xml字符串,但由于空格,测试一直失败。
@Test
public void testForEquality() throws Exception {
String myControlXML = "<msg><uuid>0x00435A8C</uuid></msg>";
String myTestXML = "<msg><uuid>0x00435A8C</uuid> </msg>";
assertXMLEqual(myControlXML, myTestXML);
Diff diff = new Diff(myControlXML, myTestXML);
assertTrue(diff.similar());
}