想用单元测试 JUnit 单元测试下写好的方法,发现写 @Test 标签报错了,"Test cannot be resolved to a type" 原来是项目没有导入 JUnit 库,解决办法很简单 项目右键 -> Build Path -> Configure Build Path -> Libraries -> Add Library -> JUnit -> next -> finish OK,问题解决了。 记录下免得下次给忘了。

相关文章:

  • 2022-01-21
  • 2021-07-07
  • 2021-10-02
  • 2021-10-19
  • 2021-08-16
  • 2021-09-23
  • 2021-07-18
  • 2021-06-23
猜你喜欢
  • 2021-08-07
  • 2022-01-19
  • 2021-07-28
  • 2021-10-04
  • 2021-12-10
  • 2022-12-23
相关资源
相似解决方案