Junit测试报错:

java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:86)
	at org.junit.Assert.assertTrue(Assert.java:41)
	at org.junit.Assert.assertTrue(Assert.java:52)
	at Calculator.CalculatorTest.testGetResult(CalculatorTest.java:86)

很可能是断言assertTrue中所得结果预期结果不一致,尤其注意检查两个变量的类型。

相关文章:

  • 2021-09-11
  • 2022-01-07
  • 2021-11-24
  • 2021-11-12
  • 2021-12-03
  • 2021-11-21
  • 2021-11-13
猜你喜欢
  • 2022-01-15
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案