Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.Response


    @Test
    public void client_cache_out_of_date() throws Exception
    {
        Request request = mockRequest();
        Response response = mockResponse();
        ClasspathAssetAliasManager aliasManager = mockClasspathAssetAliasManager();
        ResourceCache cache = mockResourceCache();
        ResourceStreamer streamer = mockResourceStreamer();
        long now = System.currentTimeMillis();
View Full Code Here


{
    @Test
    public void request_for_favicon() throws IOException
    {
        Request request = newRequest("/favicon.ico");
        Response response = mockResponse();
        RequestHandler handler = mockRequestHandler();
        Context context = mockContext();

        replay();
View Full Code Here

    @Test
    public void path_does_not_contain_a_period() throws Exception
    {
        Request request = newRequest("/start");
        Response response = mockResponse();
        RequestHandler handler = mockRequestHandler();
        Context context = mockContext();

        train_service(handler, request, response, true);
View Full Code Here

    {
        URL url = new URL("file://.");
        String path = "/cell.gif";

        Request request = newRequest(path);
        Response response = mockResponse();
        RequestHandler handler = mockRequestHandler();
        Context context = mockContext();

        train_getResource(context, path, url);
View Full Code Here

    {
        URL url = new URL("file://.");
        String path = "/cell.tml";

        Request request = newRequest(path);
        Response response = mockResponse();
        RequestHandler handler = mockRequestHandler();
        Context context = mockContext();

        train_getResource(context, path, url);

        response.sendError(
                HttpServletResponse.SC_FORBIDDEN,
                "URI /cell.tml may not be accessed remotely.");

        replay();
View Full Code Here

    {
        URL url = new URL("file://.");
        String path = "/cell.TML";

        Request request = newRequest(path);
        Response response = mockResponse();
        RequestHandler handler = mockRequestHandler();
        Context context = mockContext();

        train_getResource(context, path, url);

        response.sendError(
                HttpServletResponse.SC_FORBIDDEN,
                "URI /cell.TML may not be accessed remotely.");

        replay();
View Full Code Here

    public void not_a_static_file_request() throws Exception
    {
        String path = "/start.update";

        Request request = newRequest(path);
        Response response = mockResponse();
        RequestHandler handler = mockRequestHandler();
        Context context = mockContext();

        train_getResource(context, path, null);
        train_service(handler, request, response, true);
View Full Code Here

        train_setContentType(hsr, contentType);
        train_getOutputStream(hsr, new TestServletOutputStream());

        replay();

        Response response = new ResponseImpl(hsr);
        ResourceStreamer streamer = getService(ResourceStreamer.class);
        RequestGlobals globals = getService(RequestGlobals.class);

        globals.store(request, response);
View Full Code Here

    @Test
    public void no_dot_or_colon_in_path() throws Exception
    {
        ComponentActionRequestHandler handler = newComponentActionRequestHandler();
        Request request = mockRequest();
        Response response = mockResponse();

        train_getPath(request, "/foo/bar/baz");

        replay();
View Full Code Here

    @Test
    public void page_activation_context_in_request() throws Exception
    {
        ComponentActionRequestHandler handler = newComponentActionRequestHandler();
        Request request = mockRequest();
        Response response = mockResponse();
        ActionResponseGenerator generator = newMock(ActionResponseGenerator.class);

        train_getPath(request, "/mypage:eventname");

        train_getParameter(request, InternalConstants.PAGE_CONTEXT_NAME, "alpha/beta");
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.Response

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.