liujie
2026-01-14 f976a39b294f8c7dd60bcd2c661983c0dcc97fc6
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.estate.expert.admin.service;
 
import com.estate.expert.admin.domain.common.request.PageReq;
import com.estate.expert.admin.domain.standard.hierachy.HierarchyIds;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.transaction.annotation.Transactional;
 
import javax.annotation.Resource;
import java.util.Arrays;
 
/**
 * @ClassName ProblemServiceTest
 * @Description
 * @Author daisyli
 * @Date 2023/9/13
 **/
@Slf4j
@SpringBootTest
@ExtendWith(SpringExtension.class)
@Transactional
public class ProblemServiceTest {
 
    @Resource
    private ProblemService problemService;
 
    @Test
    public void testLoad(){
        var p = problemService.get(1);
    }
 
    @Test
    public void testList() {
        var hierarchyPaths = Arrays.asList(
                "/0/1/2/0");
 
        var response = problemService.list(HierarchyIds.SYSTEM, null, "", PageReq.defaultPageReq());
        Assertions.assertFalse(response.getList().isEmpty());
 
        var ids = problemService.listIds(HierarchyIds.SYSTEM, hierarchyPaths);
        Assertions.assertFalse(ids.isEmpty());
    }
}