Package net.officefloor.test.system
Class AbstractEnvironmentOverride<I extends AbstractExternalOverride<I>>
- java.lang.Object
-
- net.officefloor.test.system.AbstractExternalOverride<I>
-
- net.officefloor.test.system.AbstractEnvironmentOverride<I>
-
- Direct Known Subclasses:
AwsLocalEnvironment
,EnvironmentExtension
,EnvironmentRule
public abstract class AbstractEnvironmentOverride<I extends AbstractExternalOverride<I>> extends AbstractExternalOverride<I>
Abstract functionality for overriding theSystem.getenv(String)
values in tests.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractEnvironmentOverride.EnvironmentChange
Change to environment.-
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 AbstractEnvironmentOverride(java.lang.String... nameValuePairs)
Instantiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
changeEnvironment(AbstractEnvironmentOverride.EnvironmentChange change)
Undertakes environment change.protected void
clear(java.lang.String name)
Clears the value.protected java.lang.String
get(java.lang.String name)
Obtains the value.protected void
set(java.lang.String name, java.lang.String value)
Specifies the value.-
Methods inherited from class net.officefloor.test.system.AbstractExternalOverride
override, property, run
-
-
-
-
Method Detail
-
changeEnvironment
protected static void changeEnvironment(AbstractEnvironmentOverride.EnvironmentChange change)
Undertakes environment change.- Parameters:
change
-AbstractEnvironmentOverride.EnvironmentChange
.
-
get
protected java.lang.String get(java.lang.String name)
Description copied from class:AbstractExternalOverride
Obtains the value.- Specified by:
get
in classAbstractExternalOverride<I extends AbstractExternalOverride<I>>
- Parameters:
name
- Name of value.- Returns:
- Value.
-
set
protected void set(java.lang.String name, java.lang.String value)
Description copied from class:AbstractExternalOverride
Specifies the value.- Specified by:
set
in classAbstractExternalOverride<I extends AbstractExternalOverride<I>>
- Parameters:
name
- Name for value.value
- Value.
-
clear
protected void clear(java.lang.String name)
Description copied from class:AbstractExternalOverride
Clears the value.- Specified by:
clear
in classAbstractExternalOverride<I extends AbstractExternalOverride<I>>
- Parameters:
name
- Name of value.
-
-