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})
  • 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

      public static final String BASE_URI
      See Also:
    • BASE_PACKAGE

      public static final String 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 interface org.junit.jupiter.api.extension.BeforeAllCallback
    • close

      public void close()
      Specified by:
      close in interface org.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.