use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class IncludeTest method testInclude.
@Test
public void testInclude() throws Exception {
User user = User.getTestUser();
Template t = gt.getTemplate("/tag/include_template.html");
this.bind(t, "user", user);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/include_expected.html"), str);
t = gt.getTemplate("/tag/include_template.html");
this.bind(t, "user", user);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/include_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class IncludeTest method testIncludeRel.
@Test
public void testIncludeRel() throws Exception {
User user = User.getTestUser();
Template t = gt.getTemplate("/tag/main_include_template.html");
this.bind(t, "user", user);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/main_include_expected.html"), str);
t = gt.getTemplate("/tag/main_include_template.html");
this.bind(t, "user", user);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/main_include_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class LayoutTagTest method testLayout.
@Test
public void testLayout() throws Exception {
User user = User.getTestUser();
Template t = gt.getTemplate("/tag/layout_template.html");
this.bind(t, "user", user);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/layout_expected.html"), str);
t = gt.getTemplate("/tag/layout_template.html");
this.bind(t, "user", user);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/layout_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class IncDecOneTest method testAll.
@Test
public void testAll() throws Exception {
Template t = gt.getTemplate("/exp/incdecone_template.html");
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/incdecone_expected.html"), str);
// t = gt.getTemplate("/exp/incdecone_template.html");
//
// str = t.render();
// AssertJUnit.assertEquals(this.getFileContent("/exp/incdecone_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class JsonTest method testOrder.
@Test
public void testOrder() throws Exception {
Template t = gt.getTemplate("/exp/json/order_template.html");
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/json/order_expected.html"), str);
t = gt.getTemplate("/exp/json/order_template.html");
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/exp/json/order_expected.html"), str);
}
Aggregations