DeviceServiceTest.java 897 Bytes
package cn.com.glsx.admin.modules.service;

import cn.com.glsx.Application;
import cn.com.glsx.admin.modules.model.param.TrackInfoBo;
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)
public class DeviceServiceTest {

    @Autowired
    private DeviceService deviceService;

    @Test
    public void testRemoteGetDeviceBySnAndSave() {
        TrackInfoBo trackInfoBo = deviceService.remoteGetDeviceBySn("8130902002");
        log.info(trackInfoBo.toString());
        deviceService.saveTrackInfoBo(trackInfoBo, 10001L);
    }

}