Examples of ResetEventHub


Examples of org.apache.tapestry.services.ResetEventHub

    }

    public void testService() throws Exception
    {
        IRequestCycle cycle = newCycle();
        ResetEventHub hub = newMock(ResetEventHub.class);
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.PAGE, "TargetPage");

        hub.fireResetEvent();

        cycle.activate("TargetPage");

        rr.renderResponse(cycle);
View Full Code Here

Examples of org.apache.tapestry.services.ResetEventHub

    }

    public void testServiceNotEnabled() throws Exception
    {
        IRequestCycle cycle = newCycle();
        ResetEventHub hub = newMock(ResetEventHub.class);
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.PAGE, "TargetPage");

        cycle.activate("TargetPage");
View Full Code Here

Examples of org.apache.tapestry.services.ResetEventHub

    public void testSuccessfulInfrastructureLookup()
    {
        Infrastructure ifr = newMock(Infrastructure.class);

        ResetEventHub coord = newMock(ResetEventHub.class);

        expect(ifr.getResetEventHub()).andReturn(coord);

        replay();
View Full Code Here

Examples of org.apache.tapestry.services.ResetEventHub

    public void test_Normal() throws Exception
    {
        WebRequest request = newRequest();
        WebResponse response = newResponse();
        WebRequestServicer servicer = newServicer();
        ResetEventHub rec = newREC();

        servicer.service(request, response);
        rec.fireResetEvent();

        replay();

        DisableCachingFilter f = new DisableCachingFilter();
        f.setResetEventHub(rec);
View Full Code Here

Examples of org.apache.tapestry.services.ResetEventHub

    {
        WebRequest request = newRequest();
        WebResponse response = newResponse();
        WebRequestServicer servicer = newServicer();
       
        ResetEventHub rec = newMock(ResetEventHub.class);
        ErrorLog log = newMock(ErrorLog.class);

        Location l = fabricateLocation(99);

        Throwable t = new ApplicationRuntimeException("Mock failure.", l, null);

        servicer.service(request, response);

        rec.fireResetEvent();
        expectLastCall().andThrow(t);

        log.error(ImplMessages.errorResetting(t), l, t);

        replay();
View Full Code Here

Examples of org.apache.tapestry.services.ResetEventHub

    }

    public void testService() throws Exception
    {
        IRequestCycle cycle = newCycle();
        ResetEventHub hub = (ResetEventHub) newMock(ResetEventHub.class);
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.PAGE, "TargetPage");

        hub.fireResetEvent();

        cycle.activate("TargetPage");

        rr.renderResponse(cycle);
View Full Code Here

Examples of org.apache.tapestry.services.ResetEventHub

    }

    public void testServiceNotEnabled() throws Exception
    {
        IRequestCycle cycle = newCycle();
        ResetEventHub hub = (ResetEventHub) newMock(ResetEventHub.class);
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.PAGE, "TargetPage");

        cycle.activate("TargetPage");
View Full Code Here

Examples of org.apache.tapestry.services.ResetEventHub

    public void testSuccessfulInfrastructureLookup()
    {
        MockControl ifrControl = newControl(Infrastructure.class);
        Infrastructure ifr = (Infrastructure) ifrControl.getMock();

        ResetEventHub coord = (ResetEventHub) newMock(ResetEventHub.class);

        ifr.getResetEventHub();
        ifrControl.setReturnValue(coord);

        replayControls();
View Full Code Here

Examples of org.apache.tapestry.services.ResetEventHub

    public void testNormal() throws Exception
    {
        WebRequest request = newRequest();
        WebResponse response = newResponse();
        WebRequestServicer servicer = newServicer();
        ResetEventHub rec = newREC();

        servicer.service(request, response);
        rec.fireResetEvent();

        replayControls();

        DisableCachingFilter f = new DisableCachingFilter();
        f.setResetEventHub(rec);
View Full Code Here

Examples of org.apache.tapestry.services.ResetEventHub

    {
        WebRequest request = newRequest();
        WebResponse response = newResponse();
        WebRequestServicer servicer = newServicer();
        MockControl control = newControl(ResetEventHub.class);
        ResetEventHub rec = (ResetEventHub) control.getMock();
        ErrorLog log = (ErrorLog) newMock(ErrorLog.class);

        Location l = fabricateLocation(99);

        Throwable t = new ApplicationRuntimeException("Mock failure.", l, null);

        servicer.service(request, response);

        rec.fireResetEvent();
        control.setThrowable(t);

        log.error(ImplMessages.errorResetting(t), l, t);

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