MainTest.java 1.43 KB
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());
    }

}