在Eclipse外应用JUnit测试

在Eclipse外使用JUnit测试Eclipse IDE 集成了JUnit开源单元测试框架。如果不借助Eclipse的图形界面工具来生

在Eclipse外使用JUnit测试

Eclipse IDE 集成了JUnit开源单元测试框架。如果不借助Eclipse的图形界面工具来生成并运行我们的JUnit测试,该怎么实现呢?


1. 首先需要在类路径下添加JUnit-4.X jar 包。

2. 编写需要测试的方法。

Before testingAfter testingBefore testingAfter testingBefore testingAfter testingBefore testingAfter testingBefore testingAfter testingsubtract expected:<3> but was:<-3>nulltest timed out after 200 milliseconds