Search in sources :

Example 1 with WebSessionManager

use of org.apache.shiro.web.session.mgt.WebSessionManager in project shiro by apache.

the class DefaultWebSecurityManagerTest method checkSessionManagerDeterminesContainerSessionMode.

@Test
public void checkSessionManagerDeterminesContainerSessionMode() {
    sm.setSessionMode(DefaultWebSecurityManager.NATIVE_SESSION_MODE);
    WebSessionManager sessionManager = createMock(WebSessionManager.class);
    expect(sessionManager.isServletContainerSessions()).andReturn(true).anyTimes();
    replay(sessionManager);
    sm.setSessionManager(sessionManager);
    assertTrue("The set SessionManager is not being used to determine isHttpSessionMode.", sm.isHttpSessionMode());
    verify(sessionManager);
}
Also used : WebSessionManager(org.apache.shiro.web.session.mgt.WebSessionManager) Test(org.junit.Test)

Aggregations

WebSessionManager (org.apache.shiro.web.session.mgt.WebSessionManager)1 Test (org.junit.Test)1