use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class GoTest method testContinueAndReturn.
@Test
public void testContinueAndReturn() throws Exception {
Template t = gt.getTemplate("/control/go/continue_return_template.html");
this.bind(t, "dataList", data);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/go/continue_return_expected.html"), str);
t = gt.getTemplate("/control/go/continue_return_template.html");
this.bind(t, "dataList", data);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/go/continue_return_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class SelectTest method testSwitch.
@Test
public void testSwitch() throws Exception {
Template t = gt.getTemplate("/control/select/select_template.html");
this.bind(t, "dataList", data);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/select/select_expected.html"), str);
t = gt.getTemplate("/control/select/select_template.html");
this.bind(t, "dataList", data);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/select/select_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class SelectTest method testSelect2.
@Test
public void testSelect2() throws Exception {
Template t = gt.getTemplate("/control/select/select2_template.html");
this.bind(t, "dataList", data);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/select/select2_expected.html"), str);
t = gt.getTemplate("/control/select/select2_template.html");
this.bind(t, "dataList", data);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/select/select2_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class SwitchTest method testDefault.
@Test
public void testDefault() throws Exception {
Template t = gt.getTemplate("/control/swi/default_template.html");
this.bind(t, "dataList", data);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/swi/default_expected.html"), str);
t = gt.getTemplate("/control/swi/default_template.html");
this.bind(t, "dataList", data);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/swi/default_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class TryCatchTest method testGenera.
@Test
public void testGenera() throws Exception {
Template t = gt.getTemplate("/control/trycatch/general_template.html");
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/trycatch/general_expected.html"), str);
t = gt.getTemplate("/control/trycatch/general_template.html");
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/control/trycatch/general_expected.html"), str);
}
Aggregations