mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-28 23:02:15 +00:00
Correct NullPointerException as fixture missing an ApplicationContext and attempting to publish an event.
This commit is contained in:
parent
684d5bc10e
commit
798ebb1a3d
@ -37,7 +37,7 @@ import java.security.Principal;
|
|||||||
public class ConcurrentSessionControllerImplTests extends TestCase {
|
public class ConcurrentSessionControllerImplTests extends TestCase {
|
||||||
//~ Instance fields ========================================================
|
//~ Instance fields ========================================================
|
||||||
|
|
||||||
ConcurrentSessionControllerImpl target = new ConcurrentSessionControllerImpl();
|
ConcurrentSessionControllerImpl target;
|
||||||
|
|
||||||
//~ Methods ================================================================
|
//~ Methods ================================================================
|
||||||
|
|
||||||
@ -244,6 +244,11 @@ public class ConcurrentSessionControllerImplTests extends TestCase {
|
|||||||
target.removeSession("nothing to see here");
|
target.removeSession("nothing to see here");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void setUp() throws Exception {
|
||||||
|
target = new ConcurrentSessionControllerImpl();
|
||||||
|
target.setApplicationContext(MockApplicationContext.getContext());
|
||||||
|
}
|
||||||
|
|
||||||
private Authentication createAuthentication(String user, String password,
|
private Authentication createAuthentication(String user, String password,
|
||||||
String sessionId) {
|
String sessionId) {
|
||||||
UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(user,
|
UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(user,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user