Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.Request


     * TAPESTRY-1475
     */
    @Test
    public void discard_changes_with_no_session()
    {
        Request request = mockRequest();

        train_getSession(request, false, null);

        replay();

View Full Code Here


     */
    @Test
    public void discard_changes()
    {
        Session session = mockSession();
        Request request = mockRequest();

        train_getSession(request, false, session);

        train_getAttributeNames(session, "state:foo.Bar:", "state:foo.Bar:baz:field");

View Full Code Here

    }

    @Test
    public void gather_changes_with_no_session()
    {
        Request request = mockRequest();

        train_getSession(request, false, null);

        replay();
View Full Code Here

    @Test
    public void gather_changes_with_active_session()
    {
        Session session = mockSession();
        Request request = mockRequest();

        train_getSession(request, false, session);
        train_getAttributeNames(
                session,
                "state:foo.Bar:",
View Full Code Here

        content_type("image/gif", "test.gif");
    }

    private void content_type(String contentType, String fileName) throws IOException
    {
        Request request = mockRequest();
        HttpServletResponse hsr = mockHttpServletResponse();

        train_setContentLength(hsr, anyInt());
        train_setDateHeader(hsr, eq("Last-Modified"), anyLong());
        train_setContentType(hsr, contentType);
View Full Code Here

    private static final String PAGE_NAME = "Whatever";

    @Test
    public void check_request_is_secure() throws Exception
    {
        Request request = mockRequest();
        Response response = mockResponse();
        LinkFactory linkFactory = mockLinkFactory();
        MetaDataLocator locator = mockMetaDataLocator();
        BaseURLSource source = mockBaseURLSource();
        RequestPageCache cache = mockRequestPageCache();
View Full Code Here

    }

    @Test
    public void check_page_not_secure() throws Exception
    {
        Request request = mockRequest();
        Response response = mockResponse();
        LinkFactory linkFactory = mockLinkFactory();
        MetaDataLocator locator = mockMetaDataLocator();
        BaseURLSource source = mockBaseURLSource();
        RequestPageCache cache = mockRequestPageCache();
View Full Code Here

    }

    @Test
    public void check_redirect_needed() throws Exception
    {
        Request request = mockRequest();
        Response response = mockResponse();
        LinkFactory linkFactory = mockLinkFactory();
        MetaDataLocator locator = mockMetaDataLocator();
        BaseURLSource source = mockBaseURLSource();
        Page page = mockPage();
View Full Code Here

    }

    @Test(dataProvider = "base_URL_data")
    public void get_base_URL(boolean secureRequest, boolean securePage, String expectedURL)
    {
        Request request = mockRequest();
        Response response = mockResponse();
        LinkFactory linkFactory = mockLinkFactory();
        MetaDataLocator locator = mockMetaDataLocator();
        BaseURLSource source = mockBaseURLSource();
        Page page = mockPage();
View Full Code Here

public class ClientPersistentFieldStorageImplTest extends TapestryTestCase
{
    @Test
    public void no_client_data_in_request()
    {
        Request request = mockRequest(null);
        Link link = mockLink();

        replay();

        ClientPersistentFieldStorage storage = new ClientPersistentFieldStorageImpl(request);
View Full Code Here

TOP

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

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.