// Should default to SAX
assertTrue(execContext.getDeliveryConfig() instanceof SAXContentDeliveryConfig);
}
public void test_dom_sax_2() throws IOException, SAXException {
Smooks smooks;
ExecutionContext execContext;
smooks = new Smooks(getClass().getResourceAsStream("smooks-config-dom-sax-2.1.xml"));
execContext = smooks.createExecutionContext();
assertTrue(execContext.getDeliveryConfig() instanceof SAXContentDeliveryConfig);
smooks = new Smooks(getClass().getResourceAsStream("smooks-config-dom-sax-2.2.xml"));
execContext = smooks.createExecutionContext();
assertTrue(execContext.getDeliveryConfig() instanceof DOMContentDeliveryConfig);
smooks = new Smooks(getClass().getResourceAsStream("smooks-config-dom-sax-2.3.xml"));
try {
smooks.createExecutionContext();
fail("Expected SmooksException");
} catch(SmooksException e) {
assertEquals("Invalid 'stream.filter.type' configuration parameter value of 'xxxx'. Must be 'SAX' or 'DOM'.", e.getMessage());
}
}