Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.Session


        hs.invalidate();

        replay();

        Session session = new SessionImpl(hs);

        session.invalidate();

        verify();
    }
View Full Code Here


        hs.setMaxInactiveInterval(seconds);

        replay();

        Session session = new SessionImpl(hs);

        session.setMaxInactiveInterval(seconds);

        verify();
    }
View Full Code Here

        expect(hs.getMaxInactiveInterval()).andReturn(seconds);

        replay();

        Session session = new SessionImpl(hs);

        assertEquals(session.getMaxInactiveInterval(), seconds);

        verify();
    }
View Full Code Here

        train_getAttribute(ss, "foo", "bar");

        replay();

        Request request = new RequestImpl(sr);
        Session session = request.getSession(true);

        assertEquals(session.getAttribute("foo"), "bar");

        verify();
    }
View Full Code Here

public class FlashPersistentFieldStrategyTest extends InternalBaseTestCase
{
    @Test
    public void post_change_to_root_component()
    {
        Session session = mockSession();
        Request request = mockRequest();
        Object value = new Object();

        train_getSession(request, true, session);

        session.setAttribute("flash:foo.Bar::field", value);

        replay();

        PersistentFieldStrategy strategy = new FlashPersistentFieldStrategy(request);
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,
                "flash:foo.Bar:",
                "flash:foo.Bar::root",
                "flash:foo.Bar:nested:down");

        train_getAttribute(session, "flash:foo.Bar::root", "ROOT");
        session.setAttribute("flash:foo.Bar::root", null);

        train_getAttribute(session, "flash:foo.Bar:nested:down", "DOWN");
        session.setAttribute("flash:foo.Bar:nested:down", null);

        replay();

        PersistentFieldStrategy strategy = new FlashPersistentFieldStrategy(request);
View Full Code Here

    @Test
    public void create()
    {
        SessionHolderForPageTester holder = new SessionHolderForPageTester();
        Session session = holder.getSession(true);
        assertNotNull(session);
        assertEquals(session.getAttributeNames(), Collections.EMPTY_LIST);
    }
View Full Code Here

public class SessionPersistentFieldStrategyTest extends InternalBaseTestCase
{
    @Test
    public void post_change_to_root_component()
    {
        Session session = newSession();
        Request request = newRequest();
        Object value = new Object();

        train_getSession(request, true, session);

        session.setAttribute("state:foo.Bar::field", value);

        replay();

        SessionPersistentFieldStrategy strategy = new SessionPersistentFieldStrategy(request);
View Full Code Here

    }

    @Test
    public void post_change_to_nested_component()
    {
        Session session = newSession();
        Request request = newRequest();
        Object value = new Object();

        train_getSession(request, true, session);

        session.setAttribute("state:foo.Bar:fee.fum:field", value);

        replay();

        SessionPersistentFieldStrategy strategy = new SessionPersistentFieldStrategy(request);
View Full Code Here

    }

    @Test
    public void gather_changes_with_active_session()
    {
        Session session = newSession();
        Request request = newRequest();

        train_getSession(request, false, session);
        train_getAttributeNames(
                session,
View Full Code Here

TOP

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

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.