Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
342 views
in Technique[技术] by (71.8m points)

junit4 - The differences between JUnit 3 and JUnit 4


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  1. Java 5 annotations for setup and teardown (@before and @after) instead of setUp() and tearDown().

  2. don't need to extend TestCase anymore.

  3. @Test annotation replaces testSomeMethod() naming convention.

  4. static imports for asserts.

  5. Junit theories, which allow you to separate data sets from the test itself.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...