Class TomcatServerExtension

java.lang.Object
com.github.mjeanroy.junit.servers.jupiter.JunitServerExtension
com.github.mjeanroy.junit.servers.tomcat10.jupiter.TomcatServerExtension
All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.ParameterResolver

public class TomcatServerExtension extends JunitServerExtension
A specialized JunitServerExtension that will instantiate an EmbeddedTomcat server automatically instead of using the Service Provider API. Since this jupiter extends JunitServerExtension, it has exactly the same features (parameter injections, etc.).
See Also:
  • Constructor Details

    • TomcatServerExtension

      public TomcatServerExtension()
      Create the jupiter with default behavior.
    • TomcatServerExtension

      public TomcatServerExtension(EmbeddedTomcat tomcat)
      Create the jupiter and specify the embedded tomcat instance to use.
      Parameters:
      tomcat - The embedded tomcat instance to use.
      Throws:
      NullPointerException - If tomcat is null.
    • TomcatServerExtension

      public TomcatServerExtension(EmbeddedTomcatConfiguration configuration)
      Create the jupiter and specify the embedded tomcat configuration to use (when using jupiter with RegisterExtension).
      Parameters:
      configuration - The embedded tomcat configuration to use.
      Throws:
      NullPointerException - If configuration is null.
  • Method Details