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);
}
Aggregations