Examples of AssetProtectionDispatcher


Examples of org.apache.tapestry5.internal.services.AssetProtectionDispatcher

    public void ignores_nonassets() throws IOException
    {
        //shouldn't need any configuration here...
        List<AssetPathAuthorizer> auths = Collections.emptyList();
        Logger logger = createMock(Logger.class);
        AssetProtectionDispatcher disp = new AssetProtectionDispatcher(auths,null,logger);
        Request request = createMock(Request.class);
        expect(request.getPath()).andReturn("start");
        Response response = createMock(Response.class);
        replay(request,response,logger);
        assertFalse(disp.dispatch(request, response));
        verify(request,response,logger);
    }
View Full Code Here

Examples of org.apache.tapestry5.internal.services.AssetProtectionDispatcher

        expect(manager.toResourcePath(RequestConstants.ASSET_PATH_PREFIX + "/cayenne.xml")).andReturn("/cayenne.xml");
        expect(manager.toResourcePath(
                RequestConstants.ASSET_PATH_PREFIX + "/org/apache/tapestry/default.css"))
            .andReturn("/org/apache/tapestry/default.css");
        replay(auth,request,response,manager,logger);
        AssetProtectionDispatcher disp = new AssetProtectionDispatcher(auths,manager,logger);
       
        assertTrue(disp.dispatch(request,response));
        assertFalse(disp.dispatch(request, response));
        verify(auth,request,response,logger);
    }
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.