单元测试的使用

我怕爱的太早我们不能终老 提交于 2020-08-18 07:08:28
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!!!");
    }
}

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!