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