Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.RequestLocaleManager


        IPage page = newMock(IPage.class);
        checkOrder(page, false);
       
        IRequestCycle cycle = newMock(IRequestCycle.class);
        // IMarkupWriter writer = newMock(IMarkupWriter.class);
        RequestLocaleManager rlm = newMock(RequestLocaleManager.class);
        MarkupWriterSource mrs = newMock(MarkupWriterSource.class);
        WebResponse resp = newMock(WebResponse.class);
        WebRequest req = newMock(WebRequest.class);
        AssetFactory assetFactory = newMock(AssetFactory.class);
        IEngineService pageService = newEngineService();
View Full Code Here


        IMarkupWriter writer = newMock(IMarkupWriter.class);
        NestedMarkupWriter nwriter = newNestedWriter();
       
        ILink link = newMock(ILink.class);
       
        RequestLocaleManager rlm = newMock(RequestLocaleManager.class);
        MarkupWriterSource mrs = newMock(MarkupWriterSource.class);
        WebResponse resp = newMock(WebResponse.class);
        WebRequest req = newMock(WebRequest.class);
        AssetFactory assetFactory = newMock(AssetFactory.class);
        IEngineService pageService = newEngineService();
View Full Code Here

public class TestEngineManager extends BaseComponentTestCase
{

    public void testGetFromPool()
    {
        RequestLocaleManager extractor = newMock(RequestLocaleManager.class);
       
        ObjectPool pool = newMock(ObjectPool.class);

        // Training

        expect(extractor.extractLocaleForCurrentRequest()).andReturn(Locale.CHINESE);

        IEngine engine = newMock(IEngine.class);

        expect(pool.get(Locale.CHINESE)).andReturn(engine);
View Full Code Here

        verify();
    }

    public void testGetNotInPool()
    {
        RequestLocaleManager extractor = newMock(RequestLocaleManager.class);
       
        ObjectPool pool = newMock(ObjectPool.class);

        // Training

        expect(extractor.extractLocaleForCurrentRequest()).andReturn(Locale.CHINESE);

        IEngine engine = newMock(IEngine.class);

        expect(pool.get(Locale.CHINESE)).andReturn(null);
       
View Full Code Here

    {
        IPage page = newMock(IPage.class);
        checkOrder(page, false);

        IRequestCycle cycle = newMock(IRequestCycle.class);
        RequestLocaleManager rlm = newMock(RequestLocaleManager.class);

        MarkupWriterSource mrs = newMock(MarkupWriterSource.class);
        WebResponse resp = newMock(WebResponse.class);
        AssetFactory assetFactory = newMock(AssetFactory.class);
        IEngineService pageService = newEngineService();
View Full Code Here

        IMarkupWriter writer = newMock(IMarkupWriter.class);
        NestedMarkupWriter nwriter = newNestedWriter();

        ILink link = newMock(ILink.class);

        RequestLocaleManager rlm = newMock(RequestLocaleManager.class);
        MarkupWriterSource mrs = newMock(MarkupWriterSource.class);
        WebResponse resp = newMock(WebResponse.class);
        AssetFactory assetFactory = newMock(AssetFactory.class);
        IEngineService pageService = newEngineService();
View Full Code Here

        Infrastructure infra = newMock(Infrastructure.class);
        IMarkupWriter writer = newBufferWriter();

        Location l = newLocation();

        RequestLocaleManager rlm = newMock(RequestLocaleManager.class);
        MarkupWriterSource mrs = newMock(MarkupWriterSource.class);
        WebResponse resp = newMock(WebResponse.class);
        AssetFactory assetFactory = newMock(AssetFactory.class);
        IEngineService pageService = newEngineService();

        List errorPages = new ArrayList();

        List parts = new ArrayList();
        parts.add("id1");

        PrintWriter pw = newPrintWriter();
       
        rlm.persistLocale();
        expect(cycle.getInfrastructure()).andReturn(infra).anyTimes();
        expect(infra.getOutputEncoding()).andReturn(("UTF-8")).anyTimes();
        expect(cycle.getParameters("updateParts")).andReturn((String[])parts.toArray(new String[parts.size()]));
        expect(resp.getPrintWriter(isA(ContentType.class))).andReturn(pw);
        expect(mrs.newMarkupWriter(eq(pw), isA(ContentType.class))).andReturn(writer);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.RequestLocaleManager

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.