Expand test coverage.
This commit is contained in:
parent
e61427ec6c
commit
e153a54406
|
@ -56,6 +56,7 @@ public class PrincipalAcegiUserTokenTests extends TestCase {
|
||||||
assertEquals("Test", token.getPrincipal());
|
assertEquals("Test", token.getPrincipal());
|
||||||
assertEquals("Password", token.getCredentials());
|
assertEquals("Password", token.getCredentials());
|
||||||
assertEquals("my_password".hashCode(), token.getKeyHash());
|
assertEquals("my_password".hashCode(), token.getKeyHash());
|
||||||
|
assertEquals("Test", token.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIsUserInRole() throws Exception {
|
public void testIsUserInRole() throws Exception {
|
||||||
|
@ -84,10 +85,6 @@ public class PrincipalAcegiUserTokenTests extends TestCase {
|
||||||
"Test", "Password",
|
"Test", "Password",
|
||||||
new GrantedAuthority[] {new GrantedAuthorityImpl("ROLE_ONE"), new GrantedAuthorityImpl(
|
new GrantedAuthority[] {new GrantedAuthorityImpl("ROLE_ONE"), new GrantedAuthorityImpl(
|
||||||
"ROLE_TWO")});
|
"ROLE_TWO")});
|
||||||
System.out.println("Token 1:" + token1.toString() + " hash of pass "
|
|
||||||
+ token1.getKeyHash());
|
|
||||||
System.out.println("Token 2:" + token2.toString() + " hash of pass "
|
|
||||||
+ token2.getKeyHash());
|
|
||||||
assertEquals(token1, token2);
|
assertEquals(token1, token2);
|
||||||
|
|
||||||
PrincipalAcegiUserToken token3 = new PrincipalAcegiUserToken("my_password",
|
PrincipalAcegiUserToken token3 = new PrincipalAcegiUserToken("my_password",
|
||||||
|
|
Loading…
Reference in New Issue