|
@@ -151,7 +151,10 @@ public class UserRepoTest {
|
|
user.setEvaluationAgency(evaluationAgency);
|
|
user.setEvaluationAgency(evaluationAgency);
|
|
user.setRoleList(roleList);
|
|
user.setRoleList(roleList);
|
|
|
|
|
|
|
|
+ expectUserPO.setId(0L);
|
|
|
|
+
|
|
when(userDao.save(any(UserPO.class))).thenReturn(expectUserPO);
|
|
when(userDao.save(any(UserPO.class))).thenReturn(expectUserPO);
|
|
|
|
+ when(userDao.findById(any(Long.class))).thenReturn(Optional.of(expectUserPO));
|
|
//action
|
|
//action
|
|
User resultUser = userRepo.saveUser(user);
|
|
User resultUser = userRepo.saveUser(user);
|
|
//assert
|
|
//assert
|