use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class GeneralNumberTest method testDiv.
@Test
public void testDiv() throws Exception {
Template t = gt.getTemplate("/exp/general_div_template.html");
this.bind(t, "d1", d1, "d2", d2);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/general_div_expected.html"), str);
t = gt.getTemplate("/exp/general_div_template.html");
this.bind(t, "d1", d1, "d2", d2);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/general_div_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class GeneralNumberTest method testAdd.
@Test
public void testAdd() throws Exception {
Template t = gt.getTemplate("/exp/general_add_template.html");
this.bind(t, "d1", d1, "d2", d2);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/general_add_expected.html"), str);
t = gt.getTemplate("/exp/general_add_template.html");
this.bind(t, "d1", d1, "d2", d2);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/general_add_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class GoTest method testBreak2.
@Test
public void testBreak2() throws Exception {
Template t = gt.getTemplate("/control/go/break2_template.html");
this.bind(t, "dataList", data);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/go/break2_expected.html"), str);
t = gt.getTemplate("/control/go/break2_template.html");
this.bind(t, "dataList", data);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/go/break2_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class Pojo2 method testWrongSimple.
@Test
public void testWrongSimple() throws Exception {
Pojo2 p = new Pojo2();
Template t = gt.getTemplate("/lang/pojo2_template.html");
t.binding("p", p);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/lang/pojo2_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class NativeTest method testMethodParameter.
@Test
public void testMethodParameter() throws Exception {
NativeTest test = new NativeTest();
Template t = gt.getTemplate("/nat/nat_method2_template.html");
this.bind(t, "test", test);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/nat/nat_method2_expected.html"), str);
t = gt.getTemplate("/nat/nat_method2_template.html");
this.bind(t, "test", test);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/nat/nat_method2_expected.html"), str);
}
Aggregations