public void testEachDirective() throws IOException {
String srcFile = "tests/eachTag.html";
String src = readFile(srcFile);
JapidTemplate bt = new JapidTemplate("eachTag.html", src);
JapidAbstractCompiler cp = new JapidTemplateCompiler ();
cp.compile(bt);
System.out.println(bt.javaSource);
assertTrue("invalid java code", JavaSyntaxTool.isValid(bt.javaSource));
assertTrue(bt.javaSource.contains("final Each _Each0 = new Each(getOut());"));
assertTrue(bt.javaSource.contains("_Each0.setActionRunners(getActionRunners());"));
assertTrue(bt.javaSource.contains("_Each0.render(sa, new Each.DoBody<String>(){"));