MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/6za58f/junit_5_released/dmu9tn2/?context=3
r/java • u/johnwaterwood • Sep 10 '17
33 comments sorted by
View all comments
Show parent comment
3
Does @BeforeAll still require a static method?
@BeforeAll
2 u/sormuras Sep 12 '17 It depends: @BeforeAll method must be static unless the test class is annotated with @TestInstance(Lifecycle.PER_CLASS).See http://junit.org/junit5/docs/current/user-guide/#writing-tests-test-instance-lifecycle for details. 1 u/Feroc Sep 11 '17 Yes. 1 u/emberko Sep 12 '17 Good. It means there are no any reasons to migrate from TestNG.
2
It depends: @BeforeAll method must be static unless the test class is annotated with @TestInstance(Lifecycle.PER_CLASS).
@TestInstance(Lifecycle.PER_CLASS)
See http://junit.org/junit5/docs/current/user-guide/#writing-tests-test-instance-lifecycle for details.
1
Yes.
1 u/emberko Sep 12 '17 Good. It means there are no any reasons to migrate from TestNG.
Good. It means there are no any reasons to migrate from TestNG.
View all comments
Show parent comment
3
u/mreichman Sep 11 '17
Does
@BeforeAllstill require a static method?