how to fix “The import org.junit.jupiter”?

狂风中的少年 提交于 2021-01-27 13:00:26

问题


I'm working on MMU project and I don't know how to fix this error on @Test annotation.

How I can fix it? I have added JUnit library but that's not working.


回答1:


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).

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


来源:https://stackoverflow.com/questions/51046506/how-to-fix-the-import-org-junit-jupiter

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