Package org.apache.tapestry

Examples of org.apache.tapestry.IRequestCycle


    public void testAddParametersForPersistentProperties()
    {
        MockControl requestc = newControl(WebRequest.class);
        WebRequest request = (WebRequest) requestc.getMock();

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

        request.getParameterNames();
        requestc.setReturnValue(Arrays.asList(new Object[]
        { "foo", "state:MyPage" }));
View Full Code Here


        }
    }

    public void testGetAllStoredChanges()
    {
        IRequestCycle cycle = newCycle();

        MockControl control = newControl(PropertyPersistenceStrategy.class);
        PropertyPersistenceStrategy strategy = (PropertyPersistenceStrategy) control.getMock();

        PropertyChange change = (PropertyChange) newMock(PropertyChange.class);
View Full Code Here

        verifyControls();
    }

    public void testAddParameters()
    {
        IRequestCycle cycle = newCycle();
        PropertyPersistenceStrategy strategy = newStrategy();
        ServiceEncoding encoding = (ServiceEncoding) newMock(ServiceEncoding.class);

        strategy.addParametersForPersistentProperties(encoding, cycle);
View Full Code Here

        verifyControls();
    }

    public void testDiscardStoredChanges()
    {
        IRequestCycle cycle = newCycle();
        PropertyPersistenceStrategy strategy = newStrategy();

        strategy.discardStoredChanges("Home", cycle);

        replayControls();
View Full Code Here

    {
        MockControl enginec = newControl(IEngine.class);
        IEngine engine = (IEngine) enginec.getMock();

        MockControl cyclec = newControl(IRequestCycle.class);
        IRequestCycle cycle = (IRequestCycle) cyclec.getMock();

        cycle.getEngine();
        cyclec.setReturnValue(engine);

        engine.getOutputEncoding();
        enginec.setReturnValue("utf-8");
View Full Code Here

    public void testNoEncoders()
    {
        ErrorLog log = newErrorLog();
        WebRequest request = newRequest();
        IRequestCycle cycle = newCycle();

        replayControls();

        LinkFactoryImpl lf = new LinkFactoryImpl();
View Full Code Here

        WebRequest request = newRequest();
        MockControl enginec = newControl(IEngine.class);
        IEngine engine = (IEngine) enginec.getMock();

        MockControl cyclec = newControl(IRequestCycle.class);
        IRequestCycle cycle = (IRequestCycle) cyclec.getMock();

        cycle.getEngine();
        cyclec.setReturnValue(engine);

        engine.getOutputEncoding();
        enginec.setReturnValue("utf-8");
       
        cycle.encodeURL("/context/app?foo=bar&service=myservice");
        cyclec.setReturnValue("{encoded}");

        replayControls();

        LinkFactoryImpl lf = new LinkFactoryImpl();
View Full Code Here

    }

    public void testNoopEncoders()
    {
        WebRequest request = newRequest();
        IRequestCycle cycle = newCycle();
        ErrorLog log = newErrorLog();

        replayControls();

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

    }

    public void testActiveEncoder()
    {
        WebRequest request = newRequest();
        IRequestCycle cycle = newCycle();
        ErrorLog log = newErrorLog();

        replayControls();
        PageServiceEncoder e = new PageServiceEncoder();
        e.setServiceName("page");
View Full Code Here

    }

    public void testWithServiceParameters()
    {
        WebRequest request = newRequest();
        IRequestCycle cycle = newCycle();
        ErrorLog log = newErrorLog();

        replayControls();

        PageServiceEncoder e = new PageServiceEncoder();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.IRequestCycle

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.