package com.example.demo;
import org.junit.Test; //重要包
import org.junit.runner.RunWith;//重要包
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
/**
* @Description:TestJson
* [@author](https://my.oschina.net/arthor): Ashley
* [@Date](https://my.oschina.net/u/2504391) :2020/6/25
*/
@RunWith(SpringRunner.class)//测试类加@RunWith注解
@SpringBootTest(classes = TestHttpClientApplication.class) //主程序java程序必须是SpringBootApplication程序
public class TestJson {
@Test
public void testForTest(){
System.out.println("单元测试方法 testForTest!!!");
}
}
来源:oschina
链接:https://my.oschina.net/u/3678875/blog/4322128