Package net.officefloor.test.system
Class EnvironmentExtension
- java.lang.Object
-
- net.officefloor.test.system.AbstractExternalOverride<I>
-
- net.officefloor.test.system.AbstractEnvironmentOverride<EnvironmentExtension>
-
- net.officefloor.test.system.EnvironmentExtension
-
- 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
public class EnvironmentExtension extends AbstractEnvironmentOverride<EnvironmentExtension> implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.AfterAllCallback
Extensionfor specifying environment (System.getenv()) for tests.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.test.system.AbstractEnvironmentOverride
AbstractEnvironmentOverride.EnvironmentChange
-
Nested classes/interfaces inherited from class net.officefloor.test.system.AbstractExternalOverride
AbstractExternalOverride.ContextRunnable<T extends java.lang.Throwable>, AbstractExternalOverride.OverrideReset
-
-
Constructor Summary
Constructors Constructor Description EnvironmentExtension(java.lang.String... nameValuePairs)Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterAll(org.junit.jupiter.api.extension.ExtensionContext context)voidafterEach(org.junit.jupiter.api.extension.ExtensionContext context)voidbeforeAll(org.junit.jupiter.api.extension.ExtensionContext context)voidbeforeEach(org.junit.jupiter.api.extension.ExtensionContext context)-
Methods inherited from class net.officefloor.test.system.AbstractEnvironmentOverride
changeEnvironment, clear, get, set
-
Methods inherited from class net.officefloor.test.system.AbstractExternalOverride
override, property, run
-
-
-
-
Method Detail
-
beforeAll
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception- Specified by:
beforeAllin interfaceorg.junit.jupiter.api.extension.BeforeAllCallback- Throws:
java.lang.Exception
-
beforeEach
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception- Specified by:
beforeEachin interfaceorg.junit.jupiter.api.extension.BeforeEachCallback- Throws:
java.lang.Exception
-
afterEach
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception- Specified by:
afterEachin interfaceorg.junit.jupiter.api.extension.AfterEachCallback- Throws:
java.lang.Exception
-
afterAll
public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception- Specified by:
afterAllin interfaceorg.junit.jupiter.api.extension.AfterAllCallback- Throws:
java.lang.Exception
-
-