Package org.springmodules.template

Examples of org.springmodules.template.Template


    }

    public void testCreateTemplate() throws Exception {
        String encoding = "UTF-8";
        Resource resource = new StringResource("Hello ${name}");
        Template template = engine.createTemplate(resource, encoding);

        Map model = new HashMap();
        model.put("name", "Lian");
        assertEquals("Hello Lian", template.generate(model));
    }
View Full Code Here


    }

    public void testCreateTemplate() throws Exception {
        String encoding = "UTF-8";
        Resource resource = new StringResource("Hello $name");
        Template template = engine.createTemplate(resource, encoding);

        Map model = new HashMap();
        model.put("name", "Daan");
        assertEquals("Hello Daan", template.generate(model));
    }
View Full Code Here

        Resource resource = new StringResource("#include( \"name\" )");

        loaderControl.replay();

        Template template = engine.createTemplate(resource, encoding);

        assertEquals("Hello", template.generate(new HashMap()));
        loaderControl.verify();
    }
View Full Code Here

TOP

Related Classes of org.springmodules.template.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.