testFreeMarkerTrans_bind("test-configs-04-SAX.cdrl");
}
public void testFreeMarkerTrans_bind(String config) throws SAXException, IOException {
Smooks smooks = new Smooks("/org/milyn/templating/freemarker/" + config);
StringReader input;
ExecutionContext context;
context = smooks.createExecutionContext();
input = new StringReader("<a><b><c x='xvalueonc2' /></b></a>");
smooks.filterSource(context, new StreamSource(input), null);
assertEquals("<mybean>xvalueonc2</mybean>",context.getBeanContext().getBean("mybeanTemplate"));
context = smooks.createExecutionContext();
input = new StringReader("<c x='xvalueonc1' />");
smooks.filterSource(context, new StreamSource(input), null);
assertEquals("<mybean>xvalueonc1</mybean>", context.getBeanContext().getBean("mybeanTemplate"));
}