Package net.officefloor.frame.test
Class TestSupportExtension
- java.lang.Object
-
- net.officefloor.frame.test.TestSupportExtension
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterEachCallback
,org.junit.jupiter.api.extension.AfterTestExecutionCallback
,org.junit.jupiter.api.extension.BeforeEachCallback
,org.junit.jupiter.api.extension.BeforeTestExecutionCallback
,org.junit.jupiter.api.extension.Extension
,org.junit.jupiter.api.extension.TestInstancePostProcessor
public class TestSupportExtension extends java.lang.Object implements org.junit.jupiter.api.extension.TestInstancePostProcessor, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.BeforeTestExecutionCallback, org.junit.jupiter.api.extension.AfterTestExecutionCallback, org.junit.jupiter.api.extension.AfterEachCallback
Extension
forTestSupport
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description TestSupportExtension()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterEach(org.junit.jupiter.api.extension.ExtensionContext context)
void
afterTestExecution(org.junit.jupiter.api.extension.ExtensionContext context)
void
beforeEach(org.junit.jupiter.api.extension.ExtensionContext context)
========================= Extension Lifecycle ===============================void
beforeTestExecution(org.junit.jupiter.api.extension.ExtensionContext context)
static <T extends TestSupport>
TgetTestSupport(java.lang.Class<T> testSupportType, org.junit.jupiter.api.extension.ExtensionContext context)
Obtains the particularTestSupport
.void
postProcessTestInstance(java.lang.Object testInstance, org.junit.jupiter.api.extension.ExtensionContext context)
-
-
-
Method Detail
-
getTestSupport
public static <T extends TestSupport> T getTestSupport(java.lang.Class<T> testSupportType, org.junit.jupiter.api.extension.ExtensionContext context)
Obtains the particularTestSupport
.- Type Parameters:
T
-TestSupport
type.- Parameters:
testSupportType
-TestSupport
type.context
-ExtensionContext
.- Returns:
- Particular
TestSupport
.
-
postProcessTestInstance
public void postProcessTestInstance(java.lang.Object testInstance, org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
- Specified by:
postProcessTestInstance
in interfaceorg.junit.jupiter.api.extension.TestInstancePostProcessor
- Throws:
java.lang.Exception
-
beforeEach
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
========================= Extension Lifecycle ===============================- Specified by:
beforeEach
in interfaceorg.junit.jupiter.api.extension.BeforeEachCallback
- Throws:
java.lang.Exception
-
beforeTestExecution
public void beforeTestExecution(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
- Specified by:
beforeTestExecution
in interfaceorg.junit.jupiter.api.extension.BeforeTestExecutionCallback
- Throws:
java.lang.Exception
-
afterTestExecution
public void afterTestExecution(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
- Specified by:
afterTestExecution
in interfaceorg.junit.jupiter.api.extension.AfterTestExecutionCallback
- Throws:
java.lang.Exception
-
afterEach
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
- Specified by:
afterEach
in interfaceorg.junit.jupiter.api.extension.AfterEachCallback
- Throws:
java.lang.Exception
-
-