完善 DeptServiceImpl 单元测试

This commit is contained in:
YunaiV
2023-02-01 00:07:28 +08:00
parent 2edf53a403
commit 7f6d64e921
12 changed files with 187 additions and 127 deletions

View File

@@ -104,7 +104,7 @@ public class BpmTaskAssignRuleServiceImplTest extends BaseDbUnitTest {
// mock 方法
DeptRespDTO dept1 = randomPojo(DeptRespDTO.class, o -> o.setLeaderUserId(11L));
DeptRespDTO dept2 = randomPojo(DeptRespDTO.class, o -> o.setLeaderUserId(22L));
when(deptApi.getDepts(eq(rule.getOptions()))).thenReturn(success(Arrays.asList(dept1, dept2)));
when(deptApi.getDeptList(eq(rule.getOptions()))).thenReturn(success(Arrays.asList(dept1, dept2)));
mockGetUserMap(asSet(11L, 22L));
// 调用