Tidying imports etc to remove compiler warnings.

This commit is contained in:
Luke Taylor
2009-09-05 14:14:58 +00:00
parent d099d14e9b
commit 5bdfd8cd77
7 changed files with 33 additions and 34 deletions

View File

@@ -9,7 +9,6 @@ import javax.servlet.http.HttpSession;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.authentication.concurrent.SessionRegistry;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.savedrequest.SavedRequest;
@@ -30,17 +29,16 @@ public class DefaultSessionAuthenticationStrategyTests {
assertNull(request.getSession(false));
}
// @Test
// public void newSessionIsCreatedIfSessionAlreadyExists() throws Exception {
// DefaultSessionAuthenticationStrategy strategy = new DefaultSessionAuthenticationStrategy();
// strategy.setSessionRegistry(mock(SessionRegistry.class));
// HttpServletRequest request = new MockHttpServletRequest();
// String sessionId = request.getSession().getId();
//
// strategy.onAuthentication(mock(Authentication.class), request, new MockHttpServletResponse());
//
// assertFalse(sessionId.equals(request.getSession().getId()));
// }
@Test
public void newSessionIsCreatedIfSessionAlreadyExists() throws Exception {
DefaultSessionAuthenticationStrategy strategy = new DefaultSessionAuthenticationStrategy();
HttpServletRequest request = new MockHttpServletRequest();
String sessionId = request.getSession().getId();
strategy.onAuthentication(mock(Authentication.class), request, new MockHttpServletResponse());
assertFalse(sessionId.equals(request.getSession().getId()));
}
// See SEC-1077
@Test