Class TomcatServerJunit4Rule

java.lang.Object
org.junit.rules.ExternalResource
com.github.mjeanroy.junit.servers.junit4.ServerRule
com.github.mjeanroy.junit.servers.tomcat10.junit4.TomcatServerJunit4Rule
All Implemented Interfaces:
org.junit.rules.TestRule

public class TomcatServerJunit4Rule extends ServerRule
Rule that can be used to start and stop embedded tomcat server.
  • Constructor Details

    • TomcatServerJunit4Rule

      public TomcatServerJunit4Rule(EmbeddedTomcat tomcat)
      Create rule.
      Parameters:
      tomcat - Tomcat Embedded Server.
      Throws:
      NullPointerException - If tomcat is null.
    • TomcatServerJunit4Rule

      public TomcatServerJunit4Rule()
      Create rule using tomcat as embedded server.
    • TomcatServerJunit4Rule

      public TomcatServerJunit4Rule(EmbeddedTomcatConfiguration configuration)
      Create rule.
      Parameters:
      configuration - Tomcat Configuration.