Currently going through the process of upgrading from Junit4 to Junit5 and running into a bit of a hurdle with something that used to work in Junit4.
Wondering if there is a way to access the @BeforeAll/@AfterAll (formerly @BeforeClass/@AfterClass) within a class which is also a @Suite
Example:
@Suite
@SelectClasses({
SquareService.class,
TriangleService.class
})
public class ShapeTestSuite {
@BeforeAll
public void beforeAll() {
Log.info("Shape Test Suite Start!");
}
@AfterAll
public void afterAll() {
Log.info("Shape Test Suite End!");
}
}
I've tried adding an extension to this class/suite, but that also does not seem to work. What am I missing? Any help would be greatly appreciated.
Thanks