use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class SafeOutputTest method testSimple.
@Test
public void testSimple() throws Exception {
Template t = gt.getTemplate("/safe/safe_template.html");
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/safe/safe_expected.html"), str);
t = gt.getTemplate("/safe/safe_template.html");
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/safe/safe_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class SafeOutputTest method testSafeExp.
@Test
public void testSafeExp() throws Exception {
Template t = gt.getTemplate("/safe/safe_exp_template.html");
t.binding("test", new User("joel"));
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/safe/safe_exp_expected.html"), str);
t = gt.getTemplate("/safe/safe_exp_template.html");
t.binding("test", new User("joel"));
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/safe/safe_exp_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class DeleteTagTest method testDeleteTag.
@Test
public void testDeleteTag() throws Exception {
User user = User.getTestUser();
Template t = gt.getTemplate("/tag/delete_template.html");
this.bind(t, "user", user);
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/delete_expected.html"), str);
t = gt.getTemplate("/tag/delete_template.html");
this.bind(t, "user", user);
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/delete_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class HtmlTagTest method testHtmlTag.
@Test
public void testHtmlTag() throws Exception {
Template t = gt.getTemplate("/tag/html_template.html");
this.bind(t, "list", User.getTestUsers());
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/html_expected.html"), str);
t = gt.getTemplate("/tag/html_template.html");
this.bind(t, "list", User.getTestUsers());
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/html_expected.html"), str);
}
use of org.beetl.core.Template in project beetl2.0 by javamonkey.
the class HtmlTagTest method testEmptyTag.
@Test
public void testEmptyTag() throws Exception {
Template t = gt.getTemplate("/tag/html4_template.html");
this.bind(t, "list", User.getTestUsers());
String str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/html4_expected.html"), str);
t = gt.getTemplate("/tag/html4_template.html");
this.bind(t, "list", User.getTestUsers());
str = t.render();
AssertJUnit.assertEquals(this.getFileContent("/tag/html4_expected.html"), str);
}
Aggregations