FileDocCategorySizeDatePackage
FreemarkerManagerTest.javaAPI DocExample1665Mon Jul 23 13:26:12 BST 2007org.apache.struts2.views.freemarker

FreemarkerManagerTest

public class FreemarkerManagerTest extends org.apache.struts2.StrutsTestCase
Test case for FreemarkerManager

Fields Summary
Constructors Summary
Methods Summary
public voidtestIfStrutsEncodingIsSetProperty()

        FreemarkerManager mgr = new FreemarkerManager();
        mgr.setEncoding("UTF-8");
        StrutsMockServletContext servletContext = new StrutsMockServletContext();
        servletContext.setAttribute(FreemarkerManager.CONFIG_SERVLET_CONTEXT_KEY, null);
        freemarker.template.Configuration conf = mgr.getConfiguration(servletContext);
        assertEquals(conf.getDefaultEncoding(), "UTF-8");