Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人能用几句话描述 JUnit 3 和 4 之间的主要区别是什么吗?
用于设置和拆卸的 Java 5 注释 ( @beforeand @after) 而不是setUp()and tearDown()。
@before
@after
setUp()
tearDown()
不再需要扩展 TestCase。
@Test注释取代了testSomeMethod()命名约定。
@Test
testSomeMethod()
static imports为断言。
static imports
Junit 理论,它允许您将数据集与测试本身分开。