潘志宝
2024-11-11 31bd2c17088ec34072deabe106ff1d695c8b2b49
提交 | 用户 | 时间
e7c126 1 package com.iailab.module.bpm.framework.flowable.core.candidate.strategy;
H 2
3 import com.iailab.framework.test.core.ut.BaseMockitoUnitTest;
4 import org.junit.jupiter.api.Test;
5 import org.mockito.InjectMocks;
6
7 import java.util.Set;
8
9 import static com.iailab.framework.common.util.collection.SetUtils.asSet;
10 import static org.junit.jupiter.api.Assertions.assertEquals;
11
12 public class BpmTaskCandidateUserStrategyTest extends BaseMockitoUnitTest {
13
14     @InjectMocks
15     private BpmTaskCandidateUserStrategy strategy;
16
17     @Test
18     public void testCalculateUsers() {
19         // 准备参数
20         String param = "1,2";
21
22         // 调用
23         Set<Long> results = strategy.calculateUsers(null, param);
24         // 断言
25         assertEquals(asSet(1L, 2L), results);
26     }
27
28 }