【代码优化】SYSTEM:优化用户导入的实现

This commit is contained in:
YunaiV
2024-07-29 19:43:08 +08:00
parent 36765d53a1
commit d0cec28bfd
2 changed files with 16 additions and 36 deletions

View File

@@ -430,6 +430,8 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest {
public void testImportUserList_01() {
// 准备参数
UserImportExcelVO importUser = randomPojo(UserImportExcelVO.class, o -> {
o.setEmail(randomEmail());
o.setMobile(randomMobile());
});
// mock 方法,模拟失败
doThrow(new ServiceException(DEPT_NOT_FOUND)).when(deptService).validateDeptList(any());