Package org.pirkaengine.core

Examples of org.pirkaengine.core.Template


    @Test
    public void render_ConditionNotEmptyFalse_Array() throws ParseException, PirkaLoadException,
            TemplateNotFoundException {
        String templateName = "ConditionNotEmptyFalse";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("items", new String[0]);
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here


     * @throws TemplateNotFoundException
     */
    @Test
    public void render_ConditionNest() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "ConditionNest";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("display", true);
        viewModel.put("title", "レンダリングテスト");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

    }

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

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

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

     * @throws TemplateNotFoundException
     */
    @Test
    public void render_Extends_expression() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
        String templateName = "Extends.expression";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("value", 2010);
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

     * @throws TemplateNotFoundException
     */
    @Test
    public void render_Extends_loop() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
        String templateName = "Extends.loop";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("items", new String[] { "Apple", "Orange", "Pine" });
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

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

     * @throws TemplateNotFoundException
     */
    @Test
    public void render_Extends_include() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
        String templateName = "Extends.include";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("text", "XML Template Engine");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

     * @throws TemplateNotFoundException
     */
    @Test
    public void render_Extends_if() throws ParseException, PirkaLoadException, TemplateNotFoundException  {
        String templateName = "Extends.if";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("flg", true);
        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.