SEC-1464: Deprecate UserMap, InMemoryDaoImpl and other related classes in favour of the simpler (non-property editor based) InMemoryUserDetailsManager.
This commit is contained in:
@@ -30,26 +30,14 @@ import java.util.Properties;
|
||||
*
|
||||
* @author Ben Alex
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class InMemoryDaoTests extends TestCase {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
public InMemoryDaoTests() {
|
||||
super();
|
||||
}
|
||||
|
||||
public InMemoryDaoTests(String arg0) {
|
||||
super(arg0);
|
||||
}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public static void main(String[] args) {
|
||||
junit.textui.TestRunner.run(InMemoryDaoTests.class);
|
||||
}
|
||||
|
||||
private UserMap makeUserMap() {
|
||||
UserMapEditor editor = new UserMapEditor();
|
||||
editor.setAsText("rod=koala,ROLE_ONE,ROLE_TWO,enabled\r\nscott=wombat,ROLE_ONE,ROLE_TWO,enabled");
|
||||
editor.setAsText("rod=koala,ROLE_ONE,ROLE_TWO,enabled\nScott=wombat,ROLE_ONE,ROLE_TWO,enabled");
|
||||
|
||||
return (UserMap) editor.getValue();
|
||||
}
|
||||
|
||||
@@ -27,27 +27,11 @@ import org.springframework.security.core.userdetails.memory.UserMapEditor;
|
||||
*
|
||||
* @author Ben Alex
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class UserMapEditorTests extends TestCase {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
public UserMapEditorTests() {
|
||||
super();
|
||||
}
|
||||
|
||||
public UserMapEditorTests(String arg0) {
|
||||
super(arg0);
|
||||
}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public static void main(String[] args) {
|
||||
junit.textui.TestRunner.run(UserMapEditorTests.class);
|
||||
}
|
||||
|
||||
public final void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testConvertedIntoUserSuccessfullyWhenDisabled() {
|
||||
UserMapEditor editor = new UserMapEditor();
|
||||
editor.setAsText("rod=koala,ROLE_ONE,ROLE_TWO,disabled");
|
||||
|
||||
@@ -29,8 +29,8 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
*
|
||||
* @author Ben Alex
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class UserMapTests {
|
||||
|
||||
@Test
|
||||
public void testAddAndRetrieveUser() {
|
||||
UserDetails rod = new User("rod", "koala", true, true, true, true,
|
||||
|
||||
Reference in New Issue
Block a user