DeviceLocationServiceTest.java 999 Bytes
package cn.com.glsx.stdinterface.modules.service;

import cn.com.glsx.Application;
import cn.com.glsx.stdinterface.dto.DeviceLocationDto;
import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class DeviceLocationServiceTest {

    @Autowired
    private DeviceLocationService deviceLocationService;

    @Test
    public void getAllDeviceLocationData() {
        List<DeviceLocationDto> allDeviceLocationData = deviceLocationService.getAllDeviceLocationData();
        System.out.println("allDeviceLocationData = " + JSONUtil.toJsonStr(allDeviceLocationData));
    }
}