Package org.pirkaengine.core

Examples of org.pirkaengine.core.Template.generate()


    @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


     */
    @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

    @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

    @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

    @Test
    public void render_prk_content() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "Content";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("text", "置換されました。");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }

}
View Full Code Here

    @Test
    public void render_no_DocType() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "DocType";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("body", "DocType");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }

}
View Full Code Here

    @Test
    public void render_Sample_ItemList() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
        this.setupViewModel();
        String templateName = "Sample_ItemList";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }

    @Test
    public void render_Sample_ItemListCR() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
View Full Code Here

    @Test
    public void render_Sample_ItemListCR() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
        this.setupViewModel();
        String templateName = "Sample_ItemListCR";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
   
    @Test
    public void render_Sample_ItemListLF() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
View Full Code Here

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

    @Test
    public void render_PrkFunctions_paddingZero() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "PrkFunctions_paddingZero";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("value", 127);
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }

    @Test
    public void render_PrkFunctions_format() throws ParseException, PirkaLoadException, TemplateNotFoundException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.