MainTest.java
1.43 KB
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
48
49
50
51
52
package com.viontech.fanxing.ops;
import com.alibaba.fastjson.JSONObject;
import com.viontech.fanxing.commons.feign.OSDConfigClient;
import com.viontech.fanxing.commons.feign.TaskFeignClient;
import com.viontech.fanxing.commons.model.Task;
import com.viontech.fanxing.commons.vo.ChannelVo;
import com.viontech.fanxing.ops.service.adapter.ChannelService;
import com.viontech.keliu.util.JsonMessageUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* .
*
* @author 谢明辉
* @date 2021/9/2
*/
@SpringBootTest
@RunWith(SpringRunner.class)
public class MainTest {
@Resource
private ChannelService channelService;
@Resource
private TaskFeignClient taskFeignClient;
@Resource
private OSDConfigClient osdConfigClient;
@Test
public void test() {
JSONObject jsonObject = osdConfigClient.listAll(null);
System.out.println(jsonObject.toString());
}
@Test
public void getTaskByChannelTest() {
JsonMessageUtil.JsonMessage<List<Task>> taskByChannelUnid =
taskFeignClient.getTaskByChannelUnid("5e19f4e3-ee71-44d9-82ad-99391b1031b5");
System.out.println(taskByChannelUnid.toString());
}
}