TestExecutionContextExpressionEvaluator evaluator = (TestExecutionContextExpressionEvaluator) ExpressionEvaluator.Factory.createInstance(TestExecutionContextExpressionEvaluator.class.getName(), "blah");
assertNotNull(evaluator.condition);
}
public void test_DOM() throws IOException, SAXException {
Smooks smooks;
ExecutionContext execContext;
SAXAndDOMVisitor.visited = false;
smooks = new Smooks(getClass().getResourceAsStream("test-config-DOM-01.xml"));
execContext = smooks.createExecutionContext();
smooks.filterSource(execContext, new StreamSource(new StringReader("<a/>")), null);
assertEquals(execContext, TestExecutionContextExpressionEvaluator.context);
assertTrue(SAXAndDOMVisitor.visited);
SAXAndDOMVisitor.visited = false;
smooks = new Smooks(getClass().getResourceAsStream("test-config-DOM-02.xml"));
execContext = smooks.createExecutionContext();
smooks.filterSource(execContext, new StreamSource(new StringReader("<a/>")), null);
assertEquals(execContext, TestExecutionContextExpressionEvaluator.context);
assertFalse(SAXAndDOMVisitor.visited);
}