assertEquals("The configured Filter ('SAX') cannot be used with the specified set of Smooks visitors. The 'DOM' Filter is the only filter that can be used for this set of Visitors. Turn on Debug logging for more information.", e.getMessage());
}
}
public void test_setting_dom() {
Smooks smooks = new Smooks();
// Set the Smooks instnace to use the DOM filter...
smooks.setFilterSettings(FilterSettings.DEFAULT_DOM);
// Add a SAX-only visitor
smooks.addVisitor(new SAXVisitor01(), "a");
try {
smooks.filterSource(new StringSource("<a/>"));
fail("Expected SmooksException.");
} catch (SmooksException e) {
assertEquals("The configured Filter ('DOM') cannot be used with the specified set of Smooks visitors. The 'SAX' Filter is the only filter that can be used for this set of Visitors. Turn on Debug logging for more information.", e.getMessage());
}
}