Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.Request


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

        train_getSession(request, false, session);
        train_getAttributeNames(
                session,
                "flash:foo.Bar:",
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

    @SuppressWarnings("unchecked")
    @Test
    public void store_and_restore_a_change()
    {
        Request request = mockRequest(null);
        Link link = mockLink();
        final Holder<String> holder = Holder.create();

        String pageName = "Foo";
        String componentId = "bar.baz";
View Full Code Here

    }

    @Test
    public void multiple_changes()
    {
        Request request = mockRequest(null);
        Link link = mockLink();

        String pageName = "Foo";
        String componentId = "bar.baz";
View Full Code Here

    }

    @Test
    public void null_value_is_a_remove()
    {
        Request request = mockRequest(null);
        Link link = mockLink();

        String pageName = "Foo";
        String componentId = "bar.baz";
        String fieldName = "woops";
View Full Code Here

    }

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

        Object badBody = new Object()
        {
            @Override
            public String toString()
View Full Code Here

    @Test
    public void corrupt_client_data()
    {
        // A cut-n-paste from some previous output, with the full value significantly truncated.
        Request request = mockRequest("H4sIAAAAAAAAAEWQsUoDQRCGJxdDTEwRU2hlZ71pBQ");

        replay();

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

        verify();
    }

    protected final Request mockRequest(String clientData)
    {
        Request request = mockRequest();

        train_getParameter(request, ClientPersistentFieldStorageImpl.PARAMETER_NAME, clientData);

        return request;
    }
View Full Code Here

    private static final Resource SMILEY = new ClasspathResource(SMILEY_PATH);

    @Test
    public void not_an_asset_request() throws Exception
    {
        Request request = mockRequest();

        train_getPath(request, "/foo/bar/Baz.gif");

        replay();
View Full Code Here

    }

    @Test
    public void unprotected_asset() throws Exception
    {
        Request request = mockRequest();
        Response response = mockResponse();
        ClasspathAssetAliasManager aliasManager = mockClasspathAssetAliasManager();
        ResourceCache cache = mockResourceCache();
        ResourceStreamer streamer = mockResourceStreamer();
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.