use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class WhileTest method testWhile.
@Test
public void testWhile() throws Exception {
Template t = gt.getTemplate("/control/while/while_template.html");
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/while/while_expected.html"), str);
t = gt.getTemplate("/control/while/while_template.html");
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/while/while_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class generalForTest method testBreak.
@Test
public void testBreak() throws Exception {
Template t = gt.getTemplate("/control/generalFor/general_break_template.html");
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/generalFor/general_break_expected.html"), str);
// t = gt.getTemplate("/control/generalFor/general_break_template.html");
// //this.bind(t, "dataList", data);
// str = t.render();
// AssertJUnit.assertEquals(this.getFileContent("/control/generalFor/general_break_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class AssignTest method testVarBlock.
@Test
public void testVarBlock() throws Exception {
Template t = gt.getTemplate("/exp/assign/block_template.html");
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/assign/block_expected.html"), str);
t = gt.getTemplate("/exp/assign/block_template.html");
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/assign/block_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class AssignTest method testLeftAsign.
@Test
public void testLeftAsign() throws Exception {
Template t = gt.getTemplate("/exp/assign/left_template.html");
t.binding("d", 100);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/assign/left_expected.html"), str);
t = gt.getTemplate("/exp/assign/left_template.html");
t.binding("d", 100);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/assign/left_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class AssignTest method testNull.
@Test
public void testNull() throws Exception {
Template t = gt.getTemplate("/exp/assign/assign_null_template.html");
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/assign/assign_null_expected.html"), str);
t = gt.getTemplate("/exp/assign/assign_null_template.html");
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/assign/assign_null_expected.html"), str);
}
Aggregations