Expand unit test coverage.
This commit is contained in:
parent
ff38767efd
commit
5dbef97a1d
|
@ -83,9 +83,10 @@ public class ReflectionSaltSourceTests extends TestCase {
|
||||||
assertEquals("getUsername", saltSource.getUserPropertyToUse());
|
assertEquals("getUsername", saltSource.getUserPropertyToUse());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNormalOperation() {
|
public void testNormalOperation() throws Exception {
|
||||||
ReflectionSaltSource saltSource = new ReflectionSaltSource();
|
ReflectionSaltSource saltSource = new ReflectionSaltSource();
|
||||||
saltSource.setUserPropertyToUse("getUsername");
|
saltSource.setUserPropertyToUse("getUsername");
|
||||||
|
saltSource.afterPropertiesSet();
|
||||||
|
|
||||||
User user = new User("scott", "wombat", true,
|
User user = new User("scott", "wombat", true,
|
||||||
new GrantedAuthority[] {new GrantedAuthorityImpl("HOLDER")});
|
new GrantedAuthority[] {new GrantedAuthorityImpl("HOLDER")});
|
||||||
|
|
|
@ -62,9 +62,10 @@ public class SystemWideSaltSourceTests extends TestCase {
|
||||||
assertEquals("helloWorld", saltSource.getSystemWideSalt());
|
assertEquals("helloWorld", saltSource.getSystemWideSalt());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNormalOperation() {
|
public void testNormalOperation() throws Exception {
|
||||||
SystemWideSaltSource saltSource = new SystemWideSaltSource();
|
SystemWideSaltSource saltSource = new SystemWideSaltSource();
|
||||||
saltSource.setSystemWideSalt("helloWorld");
|
saltSource.setSystemWideSalt("helloWorld");
|
||||||
|
saltSource.afterPropertiesSet();
|
||||||
assertEquals("helloWorld", saltSource.getSalt(null));
|
assertEquals("helloWorld", saltSource.getSalt(null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue