finish user context switch event publishing

This commit is contained in:
Mark St. Godard
2005-09-03 20:24:35 +00:00
parent 4ae14cc7bc
commit 9d359780d9
2 changed files with 51 additions and 40 deletions

View File

@@ -22,7 +22,6 @@ import net.sf.acegisecurity.GrantedAuthority;
import net.sf.acegisecurity.GrantedAuthorityImpl;
import net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken;
import net.sf.acegisecurity.providers.dao.User;
import net.sf.acegisecurity.ui.switchuser.SwitchUserGrantedAuthority;
/**
@@ -92,13 +91,13 @@ public class AuthenticationEventTests extends TestCase {
public void testSwitchUserContextEvent() {
Authentication auth = getAuthentication();
User targetUser = getUser();
AuthenticationSwitchUserEvent event = new AuthenticationSwitchUserEvent(auth,
targetUser);
assertEquals(auth, event.getAuthentication());
assertEquals(targetUser, event.getUser());
}
}
private Authentication getAuthentication() {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken("Principal",
"Credentials");