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!!!");
}
}
單元測試的使用
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.