Package org.pirkaengine.core

Examples of org.pirkaengine.core.Template


    }

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


    }

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

    }

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

    }

    @Test
    public void render_ConditionEmptyTrue_List() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "ConditionEmptyTrue";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("items", new ArrayList<String>());
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

    }

    @Test
    public void render_ConditionEmptyFalse_List() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "ConditionEmptyFalse";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        ArrayList<String> list = new ArrayList<String>();
        list.add("Item");
        viewModel.put("items", list);
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

    }

    @Test
    public void render_ConditionEmptyTrue_Array() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "ConditionEmptyTrue";
        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

    }

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

    @Test
    public void render_ConditionNotEmptyTrue_List() throws ParseException, PirkaLoadException,
            TemplateNotFoundException {
        String templateName = "ConditionNotEmptyTrue";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        ArrayList<String> list = new ArrayList<String>();
        list.add("Item");
        viewModel.put("items", list);
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

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

    @Test
    public void render_ConditionNotEmptyTrue_Array() throws ParseException, PirkaLoadException,
            TemplateNotFoundException {
        String templateName = "ConditionNotEmptyTrue";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("items", new String[] {
            "Item"
        });
        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.