这段代码运行的时间十分合理,但是几个测试断言都失败了。
This code runs in a respectable time, but a couple of the test assertions fail.
执行与测试用例相关的断言。
举例来说,下面有一个测试方法,其中有一些简单的断言。
For example, there is a test method like the following with some simple assertions.
断言方法测试事情是否为true。
同样,可以用5个passing断言运行这些测试。
Once again, you can run the tests with five passing assertions.
相反,他们提供了JUnit断言来通知失效或者展开测试。
Instead, they offer JUnit assertions to both signal the failure and unwind the test.
测试结果证实了我们的断言。
测试结果证实了我们的断言。
应用推荐