org.junit.jupiter.api.Test和org.junit.Test

org.junit.jupiter.api.Test和org.junit.Test,第1张

org.junit.jupiter.api.Test和org.junit.Test

spring boot 2.2之前使用的是 Junit4 org.junit.Test

package com.example.demo1;

import org.junit.Test;

import org.junit.runner.RunWith;

import org.springframework.boot.test.context.SpringBootTest;

import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class Demo1ApplicationTests {
    @Test

    public void contextLoads() {
    }

spring boot 2.2之后使用的是 Junit5 org.junit.jupiter.api.Test

package com.example.demo;

import org.junit.jupiter.api.Test;

import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class Demo1ApplicationTests {
    @Test

    public void contextLoads() {
    }

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/877760.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-13
下一篇 2022-05-13

发表评论

登录后才能评论

评论列表(0条)

保存