单元测试的使用
时间: 2020-06-25来源:OSCHINA
前景提要
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!!!"); } }

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行