Package org.apache.tapestry.markup

Examples of org.apache.tapestry.markup.MarkupWriterSource


    private MarkupWriterSource newSource(PrintWriter printWriter, ContentType contentType,
            IMarkupWriter writer)
    {
        MockControl control = newControl(MarkupWriterSource.class);
        MarkupWriterSource source = (MarkupWriterSource) control.getMock();

        source.newMarkupWriter(printWriter, contentType);
        control.setReturnValue(writer);

        return source;
    }
View Full Code Here


        IMarkupWriter writer = (IMarkupWriter) control.getMock();

        writer.getNestedWriter();
        control.setReturnValue(nested);

        MarkupWriterSource source = newSource(pw, ct, writer);
        IPage page = newPage(ct);
        IEngineService assetService = newAssetService();

        IRequestCycle cycle = newCycle("ZePage", page);
View Full Code Here

        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();

        List errorPages = new ArrayList();
View Full Code Here

        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();

        List errorPages = new ArrayList();
View Full Code Here

        ILink link = newMock(ILink.class);
        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");

        DojoAjaxResponseBuilder builder =  new DojoAjaxResponseBuilder(cycle, rlm, mrs, resp, errorPages, assetFactory, "", pageService);

        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);

        expect(cycle.getPage()).andReturn(page);
        expect(page.getLocation()).andReturn(l);
        expect(cycle.getAttribute(TapestryUtils.PAGE_RENDER_SUPPORT_ATTRIBUTE)).andReturn(null);
        cycle.setAttribute(eq(TapestryUtils.PAGE_RENDER_SUPPORT_ATTRIBUTE), isA(PageRenderSupport.class));
View Full Code Here

        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();

        List errorPages = new ArrayList();
View Full Code Here

        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();

        List errorPages = new ArrayList();
View Full Code Here

        ILink link = newMock(ILink.class);
        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");

        DojoAjaxResponseBuilder builder =  new DojoAjaxResponseBuilder(cycle, rlm, mrs, resp, errorPages, assetFactory, "", pageService);

        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);

        expect(cycle.getPage()).andReturn(page);
        expect(page.getLocation()).andReturn(l);
        expect(cycle.getAttribute(TapestryUtils.PAGE_RENDER_SUPPORT_ATTRIBUTE)).andReturn(null);
        cycle.setAttribute(eq(TapestryUtils.PAGE_RENDER_SUPPORT_ATTRIBUTE), isA(PageRenderSupport.class));
View Full Code Here

    private MarkupWriterSource newSource(PrintWriter printWriter, ContentType contentType,
            IMarkupWriter writer)
    {
        MockControl control = newControl(MarkupWriterSource.class);
        MarkupWriterSource source = (MarkupWriterSource) control.getMock();

        source.newMarkupWriter(printWriter, contentType);
        control.setReturnValue(writer);

        return source;
    }
View Full Code Here

        IMarkupWriter writer = (IMarkupWriter) control.getMock();

        writer.getNestedWriter();
        control.setReturnValue(nested);

        MarkupWriterSource source = newSource(pw, ct, writer);
        IPage page = newPage(ct);
        AssetFactory assetFactory = newAssetFactory();

        IRequestCycle cycle = newCycle("ZePage", page);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.markup.MarkupWriterSource

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.