use of org.xmlunit.builder.DiffBuilder in project irontest by zheng-wang.
the class PlaceholderDifferenceEvaluatorTest method hasIgnorePlaceholder_Exception_ExclusivelyOccupy.
@Test
public void hasIgnorePlaceholder_Exception_ExclusivelyOccupy() throws Exception {
String control = "<elem1><elem11> #{irontest.ignore}abc</elem11></elem1>";
String test = "<elem1><elem11>abc</elem11></elem1>";
DiffBuilder diffBuilder = DiffBuilder.compare(control).withTest(test).withDifferenceEvaluator(new PlaceholderDifferenceEvaluator());
try {
diffBuilder.build();
fail();
} catch (XMLUnitException e) {
assertEquals("#{irontest.ignore} must exclusively occupy the text node.", e.getCause().getMessage());
}
}
Aggregations