springboot2.0.4编写单元测试

版权声明:不卑不亢,不骄不躁---好男人就是我,我就是曾哥. https://blog.csdn.net/weixin_42884584/article/details/82183896

测试service层:

/**
 *测试系统业务类的方法
 *
 * @author 
 * @date
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {Application.class})//配置启动类
public class TestSystemInfoServiceImpl {

    @Autowired
    private SystemInfoService systemInfoService;

    @Test
    public void testGetSystemList(){
        List<SystemInfo> systemInfoList=systemInfoService.getSystemList("",null,1);

        System.out.println("systemInfoList: "+systemInfoList);
    }
}

猜你喜欢

转载自blog.csdn.net/weixin_42884584/article/details/82183896