class EnabledIfEnvironmentVariableCondition extends java.lang.Object implements ExecutionCondition
EnabledIfEnvironmentVariable| Modifier and Type | Field and Description |
|---|---|
private static ConditionEvaluationResult |
ENABLED_BY_DEFAULT |
| Constructor and Description |
|---|
EnabledIfEnvironmentVariableCondition() |
| Modifier and Type | Method and Description |
|---|---|
ConditionEvaluationResult |
evaluateExecutionCondition(ExtensionContext context)
Evaluate this condition for the supplied
ExtensionContext. |
protected java.lang.String |
getEnvironmentVariable(java.lang.String name)
Get the value of the named environment variable.
|
private static final ConditionEvaluationResult ENABLED_BY_DEFAULT
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context)
ExecutionConditionExtensionContext.
An enabled result indicates that the container or test should be executed; whereas, a disabled result indicates that the container or test should not be executed.
evaluateExecutionCondition in interface ExecutionConditioncontext - the current extension context; never nullnullprotected java.lang.String getEnvironmentVariable(java.lang.String name)
The default implementation simply delegates to
System.getenv(String). Can be overridden in a subclass for
testing purposes.