这样做可以确保在单元测试运行之前,使用新的run - groovyc目标编译groovy脚本。
Doing so ensures the groovy scripts will be compiled with the new run-groovyc goal before any unit tests are run.
JUnit 3测试运行程序(test runner)会在运行每个测试之前自动调用setUp方法。
JUnit 3 test runners automatically invoke the setUp method before running each test.
在编写代码前编写测试这种作法意味着,在测试运行并失败之前,不会做工作中真正有趣的部分。
Writing a test before the code means you don't get to do the fun part of the job until the test runs and fails.
应用推荐