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 {
|
||||
//~ Instance fields ========================================================
|
||||
|
||||
ConcurrentSessionControllerImpl target = new ConcurrentSessionControllerImpl();
|
||||
ConcurrentSessionControllerImpl target;
|
||||
|
||||
//~ Methods ================================================================
|
||||
|
||||
|
@ -244,6 +244,11 @@ public class ConcurrentSessionControllerImplTests extends TestCase {
|
|||
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,
|
||||
String sessionId) {
|
||||
UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(user,
|
||||
|
|
Loading…
Reference in New Issue