SEC-2173: Added SystemWideSaltSource.toString() test
This commit is contained in:
parent
1c50a86661
commit
2628be60d1
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
package org.springframework.security.authentication.dao.salt;
|
package org.springframework.security.authentication.dao.salt;
|
||||||
|
|
||||||
|
import static org.fest.assertions.Assertions.assertThat;
|
||||||
|
|
||||||
import org.springframework.security.authentication.dao.SystemWideSaltSource;
|
import org.springframework.security.authentication.dao.SystemWideSaltSource;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
@ -69,4 +71,12 @@ public class SystemWideSaltSourceTests extends TestCase {
|
||||||
saltSource.afterPropertiesSet();
|
saltSource.afterPropertiesSet();
|
||||||
assertEquals("helloWorld", saltSource.getSalt(null));
|
assertEquals("helloWorld", saltSource.getSalt(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SEC-2173
|
||||||
|
public void testToString() {
|
||||||
|
String systemWideSalt = "helloWorld";
|
||||||
|
SystemWideSaltSource saltSource = new SystemWideSaltSource();
|
||||||
|
saltSource.setSystemWideSalt(systemWideSalt);
|
||||||
|
assertThat(saltSource.toString()).isEqualTo(systemWideSalt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue