GpsAlarmServiceTest.java
859 Bytes
package cn.com.glsx.kafka.service;
import cn.com.glsx.Application;
import cn.com.glsx.stdinterface.dto.VehicleDto;
import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
import org.junit.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;
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class GpsAlarmServiceTest {
@Autowired
private GpsAlarmService gpsAlarmService;
@Test
public void test01() {
VehicleDto vehicleBySn = gpsAlarmService.getVehicleBySn("1610507001");
System.out.println("vehicleBySn = " + JSONUtil.toJsonStr(vehicleBySn));
}
}