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
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 Summary
ConstructorsConstructorDescriptionCreate the jupiter with default behavior.TomcatServerExtension(EmbeddedTomcatConfiguration configuration) Create the jupiter and specify the embedded tomcat configuration to use (when using jupiter withRegisterExtension).TomcatServerExtension(EmbeddedTomcat tomcat) Create the jupiter and specify the embedded tomcat instance to use. -
Method Summary
Modifier and TypeMethodDescriptionprotected EmbeddedTomcatinstantiateServer(Class<?> testClass, AbstractConfiguration configuration) Methods inherited from class com.github.mjeanroy.junit.servers.jupiter.JunitServerExtension
afterAll, afterEach, beforeAll, beforeEach, resolveParameter, supportsParameter
-
Constructor Details
-
TomcatServerExtension
public TomcatServerExtension()Create the jupiter with default behavior. -
TomcatServerExtension
Create the jupiter and specify the embedded tomcat instance to use.- Parameters:
tomcat- The embedded tomcat instance to use.- Throws:
NullPointerException- Iftomcatisnull.
-
TomcatServerExtension
Create the jupiter and specify the embedded tomcat configuration to use (when using jupiter withRegisterExtension).- Parameters:
configuration- The embedded tomcat configuration to use.- Throws:
NullPointerException- Ifconfigurationisnull.
-
-
Method Details
-
instantiateServer
- Overrides:
instantiateServerin classJunitServerExtension
-