Examples of LinkFactory


Examples of org.apache.tapestry.services.LinkFactory

    {
        Map parameters = new HashMap();
        parameters.put(ServiceConstants.SERVICE, Tapestry.HOME_SERVICE);

        MockControl factoryc = newControl(LinkFactory.class);
        LinkFactory factory = (LinkFactory) factoryc.getMock();

        ILink link = (ILink) newMock(ILink.class);
        IRequestCycle cycle = newCycle();

        factory.constructLink(cycle, parameters, true);
        factoryc.setReturnValue(link);

        replayControls();

        PortletHomeService phs = new PortletHomeService();
View Full Code Here

Examples of org.apache.tapestry.services.LinkFactory

    protected LinkFactory newLinkFactory(IRequestCycle cycle, Map parameters, boolean stateful,
            ILink link)
    {
        MockControl control = newControl(LinkFactory.class);
        LinkFactory lf = (LinkFactory) control.getMock();

        lf.constructLink(cycle, parameters, stateful);

        control.setReturnValue(link);

        return lf;
    }
View Full Code Here

Examples of org.apache.tapestry.services.LinkFactory

public class TestExternalService extends ServiceTestCase
{
    private LinkFactory newLinkFactory(IRequestCycle cycle, Object[] serviceParameters)
    {
        MockControl control = newControl(LinkFactory.class);
        LinkFactory lf = (LinkFactory) control.getMock();

        lf.extractListenerParameters(cycle);
        control.setReturnValue(serviceParameters);

        return lf;
    }
View Full Code Here

Examples of org.apache.tapestry.services.LinkFactory

        parameters.put(ServiceConstants.SERVICE, Tapestry.EXTERNAL_SERVICE);
        parameters.put(ServiceConstants.PAGE, "ActivePage");
        parameters.put(ServiceConstants.PARAMETER, serviceParameters);

        MockControl lfc = newControl(LinkFactory.class);
        LinkFactory lf = (LinkFactory) lfc.getMock();

        ILink link = (ILink) newMock(ILink.class);

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

        lf.constructLink(cycle, parameters, true);
        lfc.setReturnValue(link);

        replayControls();

        ExternalService es = new ExternalService();
View Full Code Here

Examples of org.apache.tapestry.services.LinkFactory

        cyclec.setReturnValue("ActivePage");

        cycle.getPage("ActivePage");
        cyclec.setReturnValue(page);

        LinkFactory lf = newLinkFactory(cycle, parameters);

        cycle.setListenerParameters(parameters);
        cycle.activate(page);
        page.activateExternalPage(parameters, cycle);
View Full Code Here

Examples of org.apache.tapestry.services.LinkFactory

        parameters.put(ServiceConstants.CONTAINER, null);
        parameters.put(ServiceConstants.SESSION, null);
        parameters.put(ServiceConstants.PARAMETER, serviceParameters);

        MockControl lfc = newControl(LinkFactory.class);
        LinkFactory lf = (LinkFactory) lfc.getMock();

        ILink link = newLink();

        lf.constructLink(cycle, parameters, true);
        lfc.setReturnValue(link);

        replayControls();

        DirectService ds = new DirectService();
View Full Code Here

Examples of org.apache.tapestry.services.LinkFactory

        parameters.put(ServiceConstants.CONTAINER, null);
        parameters.put(ServiceConstants.SESSION, "T");
        parameters.put(ServiceConstants.PARAMETER, serviceParameters);

        MockControl lfc = newControl(LinkFactory.class);
        LinkFactory lf = (LinkFactory) lfc.getMock();

        ILink link = newLink();

        lf.constructLink(cycle, parameters, true);
        lfc.setReturnValue(link);

        replayControls();

        DirectService ds = new DirectService();
View Full Code Here

Examples of org.apache.tapestry.services.LinkFactory

        parameters.put(ServiceConstants.CONTAINER, "ComponentPage");
        parameters.put(ServiceConstants.SESSION, null);
        parameters.put(ServiceConstants.PARAMETER, serviceParameters);

        MockControl lfc = newControl(LinkFactory.class);
        LinkFactory lf = (LinkFactory) lfc.getMock();

        ILink link = newLink();

        lf.constructLink(cycle, parameters, true);
        lfc.setReturnValue(link);

        replayControls();

        DirectService ds = new DirectService();
View Full Code Here

Examples of org.apache.tapestry.services.LinkFactory

        page.getNestedComponent("fred.barney");
        pagec.setReturnValue(d);

        MockControl lfc = newControl(LinkFactory.class);
        LinkFactory lf = (LinkFactory) lfc.getMock();

        lf.extractListenerParameters(cycle);
        lfc.setReturnValue(parameters);

        cycle.setListenerParameters(parameters);

        d.trigger(cycle);
View Full Code Here

Examples of org.apache.tapestry.services.LinkFactory

        componentPage.getNestedComponent("fred.barney");
        componentPagec.setReturnValue(d);

        MockControl lfc = newControl(LinkFactory.class);
        LinkFactory lf = (LinkFactory) lfc.getMock();

        lf.extractListenerParameters(cycle);
        lfc.setReturnValue(parameters);

        cycle.setListenerParameters(parameters);

        d.trigger(cycle);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.