Package org.apache.turbine.util

Examples of org.apache.turbine.util.TurbineConfig


    {
        super(testName);

        // Setup configuration
        tc =
            new TurbineConfig(
                ".",
                "/conf/test/CompleteTurbineResources.properties");
        tc.initialize();
    }
View Full Code Here


        }
    }

    public void testCreateTurbineWithConfiguration() throws Exception
    {
        tc = new TurbineConfig(".", "/conf/test/TemplateService.properties");

        try
        {
            tc.initialize();
View Full Code Here

    public DestroyTest(String name)
            throws Exception
    {
        super(name);
        tc = new TurbineConfig(".", "/conf/test/TemplateService.properties");
    }
View Full Code Here

        super(name);
    }

    public void testTurbineAndFirstGet() throws Exception
    {
        TurbineConfig tc = new TurbineConfig(".",
                "/conf/test/CompleteTurbineResources.properties");
        tc.initialize();

        ServletConfig config = (ServletConfig) tc;
        ServletContext context = config.getServletContext();
        assertNotNull(Turbine.getDefaultServerData());
        assertEquals("", Turbine.getServerName());
        assertEquals("80", Turbine.getServerPort());
        assertEquals("", Turbine.getScriptName());
        Turbine t = tc.getTurbine();

        MockHttpServletRequest request = getMockRequest();
        EnhancedMockHttpServletResponse resp = new EnhancedMockHttpServletResponse();

        t.doGet(request, resp);
View Full Code Here

        t.destroy();
    }

    public void testDefaultInputEncoding() throws Exception
    {
        TurbineConfig tc = new TurbineConfig(".",
                "/conf/test/CompleteTurbineResources.properties");
        tc.initialize();
        Turbine t = tc.getTurbine();
        assertNotNull(t.getDefaultInputEncoding());
        assertEquals(TurbineConstants.PARAMETER_ENCODING_DEFAULT, t.getDefaultInputEncoding());
        t.destroy();
    }
View Full Code Here

        t.destroy();
    }
   
    public void testNonDefaultEncoding() throws ServletException
    {
        TurbineConfig tc = new TurbineConfig(".",
                "/conf/test/CompleteTurbineResourcesWithEncoding.properties");
        tc.initialize();
        Turbine t = tc.getTurbine();
        assertNotNull(t.getDefaultInputEncoding());
        assertEquals("UTF-8", t.getDefaultInputEncoding());
    }
View Full Code Here

    }

    public void testTurbineConfigWithPropertiesFile() throws Exception
    {
        String value = new File("/conf/test/TemplateService.properties").getPath();
        tc = new TurbineConfig(".", value);

        ServletConfig config = (ServletConfig) tc;
        ServletContext context = config.getServletContext();

        String confFile= Turbine.findInitParameter(context, config,
View Full Code Here

    response = new MockHttpServletResponse();
    session.setupGetAttribute(User.SESSION_KEY, null);
    request.setSession(session);
    sc = config;
    tc =
      new TurbineConfig(
        ".",
        "/conf/test/CompleteTurbineResources.properties");
    tc.initialize();
  }
View Full Code Here

        assertEquals("ISO-8859-1", s);
    }

    public void setUp() throws Exception
    {
        tc = new TurbineConfig(".", "/conf/test/TestFulcrumComponents.properties");
        tc.initialize();
    }
View Full Code Here

    public TemplateTest(String name)
            throws Exception
    {
        super(name);
        tc = new TurbineConfig(".", "/conf/test/TemplateService.properties");
        tc.initialize();

        ts = (TemplateService) TurbineServices.getInstance().getService(TemplateService.SERVICE_NAME);
    }
View Full Code Here

TOP

Related Classes of org.apache.turbine.util.TurbineConfig

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.