Added the ConcurrentSessionViolationEvent that will be published by the ConcurrentSessionControllerImpl before throwing the ConcurrentSessionViolationException

This commit is contained in:
Ray Krueger
2005-03-25 00:53:46 +00:00
parent be20350737
commit 10c1926385
3 changed files with 83 additions and 4 deletions

View File

@@ -141,6 +141,14 @@ public class ConcurrentSessionControllerImplTests extends TestCase {
target.afterAuthentication(different, different);
}
public void testEventObject() {
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken("user",
"password");
ConcurrentSessionViolationEvent ev = new ConcurrentSessionViolationEvent(token);
assertEquals("The token that went in should be the token that comes out",
token, ev.getAuthentication());
}
public void testImplementsApplicationListener() throws Exception {
assertTrue("This class must implement ApplicationListener, and at one point it didn't.",
target instanceof ApplicationListener);