Could someone describe in a few words what the main differences between JUnit 3 and 4 are?
Paul Sanwald
Java 5 annotations for setup and teardown (
@beforeand@after) instead ofsetUp()andtearDown().don't need to extend TestCase anymore.
@Testannotation replacestestSomeMethod()naming convention.static importsfor asserts.Junit theories, which allow you to separate data sets from the test itself.
来源:https://stackoverflow.com/questions/6685730/the-differences-between-junit-3-and-junit-4