如何修复“导入org.junit.jupiter"? [英] how to fix "The import org.junit.jupiter"?
本文介绍了如何修复“导入org.junit.jupiter"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在从事MMU项目,但我不知道如何解决@Test
批注中的错误.
I'm working on MMU project and I don't know how to fix this error on @Test
annotation.
我该如何解决?我添加了JUnit
库,但是无法正常工作.
How I can fix it? I have added JUnit
library but that's not working.
推荐答案
JUnit Jupiter是JUnit 5的一部分.您可能添加了旧版本的JUnit(尤其是通过
JUnit Jupiter is part of JUnit 5. Chances are you've added an older version of JUnit (especially judging by the junit3 tag in your question).
您需要添加JUnit的Jupiter的引擎和API罐子:
You need to add JUnit's Jupiter's engine and api jars:
- org.junit.jupiter:junit-jupiter-api:5.2.0- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api/5.2.0
- org.junit.jupiter:junit-jupiter-engine:5.2.0- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine/5.2.0
- org.junit.jupiter:junit-jupiter-api:5.2.0 - https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api/5.2.0
- org.junit.jupiter:junit-jupiter-engine:5.2.0 - https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine/5.2.0
这篇关于如何修复“导入org.junit.jupiter"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文