Package org.pirkaengine.core

Examples of org.pirkaengine.core.Template


     * @throws TemplateNotFoundException
     */
    @Test
    public void render_prk_replace() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "Replace";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("text", "置換テキスト");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here


     * @throws TemplateNotFoundException
     */
    @Test
    public void render_prk_replace_tag() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "ReplaceTag";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("text", "置換テキスト");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

     * @throws TemplateNotFoundException
     */
    @Test(expected = ParseException.class)
    public void render_prk_replace_tag_no_value() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "ReplaceTagNoValue";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("text", "置換テキスト");
        tmpl.generate(viewModel).render();
    }
View Full Code Here

     * @throws TemplateNotFoundException
     */
    @Test
    public void render_prk_replace_empty_tag() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "ReplaceEmptyTag";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("text", "テキスト");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

public class RenderTest_escape extends RenderTest {
   
    @Test
    public void render_Escape() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
        String templateName = "Escape";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        String actual = tmpl.generate().render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

public class RenderTest_htmlEscape extends RenderTest {

    @Test
    public void render_HtmlEscape() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
        String templateName = "HtmlEscape";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("entry_text", "<b>強調</b>されます。");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

    }

    @Test
    public void render_NoHtmlEscape() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
        String templateName = "NoHtmlEscape";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("entry_text", "<b>強調</b>されます。");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

     * @throws TemplateNotFoundException
     */
    @Test
    public void render_Stub() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
        String templateName = "Stub";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        String actual = tmpl.generate().render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

     * @throws TemplateNotFoundException
     */
    @Test
    public void render_xml() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "Xml";
        Template tmpl = loader.load(getTemplateFileName(templateName, "xml"));
        viewModel.put("item", "Pirka");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual, "xml");
    }
View Full Code Here

public class RenderTest_Namespace extends RenderTest {

    @Test
    public void render_Namespace() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "Namespace";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("body", "Namespace");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

TOP

Related Classes of org.pirkaengine.core.Template

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.