The before and after methods not working in JUnitPlatform.
The code is below.
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.runner.RunWith;
@RunWith(JUnitPlatform.class)
@SelectClasses({
MyControllerTest.class
})
public class AdminAppTest {
@BeforeAll
public static void setUp() {
System.out.println("setting up");
}
@AfterAll
public static void tearDown() {
System.out.println("tearing down");
}
}
I just want to running before and after methods.
Thank you