Package org.europa.together
Class JUnit5Preperator
java.lang.Object
org.europa.together.JUnit5Preperator
- All Implemented Interfaces:
org.junit.jupiter.api.extension.BeforeAllCallback
,org.junit.jupiter.api.extension.Extension
,org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
public class JUnit5Preperator
extends Object
implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
JUnit5 Extension to run code beforr all test, like setup test suite and
shutdown after all the testenvironment.
USAGE: @ExtendWith({JUnit5DbPreperator.class})
USAGE: @ExtendWith({JUnit5DbPreperator.class})
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
JDBC_CONNECTION
public static org.europa.together.business.DatabaseActions JDBC_CONNECTION -
SERVER
public static org.glassfish.grizzly.http.server.HttpServer SERVER -
BASE_URI
- See Also:
-
BASE_PACKAGE
- See Also:
-
-
Constructor Details
-
JUnit5Preperator
public JUnit5Preperator()
-
-
Method Details
-
beforeAll
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) - Specified by:
beforeAll
in interfaceorg.junit.jupiter.api.extension.BeforeAllCallback
-
close
public void close()- Specified by:
close
in interfaceorg.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
-
isConnected
public static boolean isConnected() -
startServer
public static boolean startServer()Starts Grizzly HTTP server exposing JAX-RS resources defined in this application.- Parameters:
rc
- as ResourceConfig- Returns:
- Grizzly HTTP server.
-