DeviceControllerTest.java
753 Bytes
package com.glsx.modules.notify.controller;
import com.glsx.modules.notify.service.DeviceService;
import com.glsx.plat.core.web.R;
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.SpringJUnit4ClassRunner;
import static org.junit.Assert.*;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
@Slf4j
public class DeviceControllerTest {
@Autowired
private DeviceService deviceService;
@Test
public void getAllDevicesByUser() {
R r = deviceService.getAllDevicesByUser("1");
log.info(r.toString());
}
}