コード例 #1
0
 @Test
 public void shouldCreateActiveUserByDefault() {
   motechUserService.register(
       "userName", "password", "1234", "", asList("IT_ADMIN", "DB_ADMIN"), Locale.ENGLISH);
   MotechUser motechUser = usersDataService.findByUserName("userName");
   assertEquals(UserStatus.ACTIVE, motechUser.getUserStatus());
 }
コード例 #2
0
 @Test
 public void shouldCreateBlockedUser() {
   motechUserService.register(
       "userName",
       "password",
       "1234",
       "",
       asList("IT_ADMIN", "DB_ADMIN"),
       Locale.ENGLISH,
       UserStatus.BLOCKED,
       null);
   MotechUser motechUser = usersDataService.findByUserName("userName");
   assertEquals(UserStatus.BLOCKED, motechUser.getUserStatus());
 }