Package org.pirkaengine.core

Examples of org.pirkaengine.core.Template


     * @throws ModelDeficientPropertyException
     */
    @Test
    public void create_public_field() throws ModelDeficientPropertyException {
       
        @SuppressWarnings("serial")
        Template template = new XhtmlTemplate("test") {
            @Override
            public Map<String, Object> createViewModel() {
                HashMap<String, Object> model = new HashMap<String, Object>();
                model.put("name", new Object());
View Full Code Here


     * @throws ModelDeficientPropertyException
     */
    @Test
    public void create_getter() throws ModelDeficientPropertyException {
       
        @SuppressWarnings("serial")
        Template template = new XhtmlTemplate("test") {
            @Override
            public Map<String, Object> createViewModel() {
                HashMap<String, Object> model = new HashMap<String, Object>();
                model.put("name", new Object());
View Full Code Here

     * @throws ModelDeficientPropertyException
     */
    @Test
    public void create_method() throws ModelDeficientPropertyException {
       
        @SuppressWarnings("serial")
        Template template = new XhtmlTemplate("test") {
            @Override
            public Map<String, Object> createViewModel() {
                HashMap<String, Object> model = new HashMap<String, Object>();
                model.put("name", new Object());
View Full Code Here

     * @throws ModelDeficientPropertyException
     */
    @Test
    public void create_composite() throws ModelDeficientPropertyException {
       
        @SuppressWarnings("serial")
        Template template = new XhtmlTemplate("test") {
            @Override
            public Map<String, Object> createViewModel() {
                HashMap<String, Object> model = new HashMap<String, Object>();
                model.put("name", new Object());
View Full Code Here

     * @throws ModelDeficientPropertyException
     */
    @Test
    public void create_nest() throws ModelDeficientPropertyException {
       
        @SuppressWarnings("serial")
        Template template = new XhtmlTemplate("test") {
            @Override
            public Map<String, Object> createViewModel() {
                HashMap<String, Object> nest = new HashMap<String, Object>();
                nest.put("name", new Object());
View Full Code Here

     * プロパティが不足した場合
     * @throws ModelDeficientPropertyException
     */
    @Test(expected = ModelDeficientPropertyException.class)
    public void create_no_property() throws ModelDeficientPropertyException {
        @SuppressWarnings("serial")
        Template template = new XhtmlTemplate("test") {
            @Override
            public Map<String, Object> createViewModel() {
                HashMap<String, Object> model = new HashMap<String, Object>();
                model.put("name", new Object());
View Full Code Here

     */
    @Test
    public void render_prk_debug_true() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        PirkaContext.getInstance().setEnableDebug(true);
        String templateName = "Debug";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        String actual = tmpl.generate().render();
        assertRenderEquals(templateName + ".true", actual);
    }
View Full Code Here

     */
    @Test
    public void render_prk_debug_false() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        PirkaContext.getInstance().setEnableDebug(false);
        String templateName = "Debug";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        String actual = tmpl.generate().render();
        assertRenderEquals(templateName + ".false", actual);
    }
View Full Code Here

     * @throws TemplateNotFoundException
     */
    @Test
    public void render_prk_attr_class() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "Attr.class";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("selected_class", "selected");
        String actual = tmpl.generate(viewModel).render();
        assertRenderEquals(templateName, actual);
    }
View Full Code Here

     * @throws TemplateNotFoundException
     */
    @Test
    public void render_prk_attr_multiClass() throws ParseException, PirkaLoadException, TemplateNotFoundException {
        String templateName = "Attr.multiClass";
        Template tmpl = loader.load(getTemplateFileName(templateName));
        viewModel.put("_href", "./about.html");
        viewModel.put("_title", "会社概要");
        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.