Package net.thucydides.core.util
Class SystemEnvironmentVariables
java.lang.Object
net.thucydides.core.util.SystemEnvironmentVariables
- All Implemented Interfaces:
EnvironmentVariables
Return system environment variable values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasMap()booleanaValueIsDefinedFor(Enum<?> property) booleanaValueIsDefinedFor(String property) voidclearProperty(String name) copy()static EnvironmentVariablesgetKeys()getPropertiesWithPrefix(String prefix) getProperty(Enum<?> property) getProperty(Enum<?> property, String defaultValue) getProperty(String name) getProperty(String name, String defaultValue) getPropertyAsBoolean(Enum<?> property, boolean defaultValue) getPropertyAsBoolean(String name, boolean defaultValue) getPropertyAsInteger(Enum<?> property, Integer defaultValue) getPropertyAsInteger(String property, Integer defaultValue) injectSystemPropertiesInto(String value) optionalProperty(String name) Returns an optional system property.voidsetProperties(Map<String, String> properties) voidsetProperty(String name, String value)
-
Constructor Details
-
SystemEnvironmentVariables
public SystemEnvironmentVariables()
-
-
Method Details
-
getValue
- Specified by:
getValuein interfaceEnvironmentVariables
-
getValue
- Specified by:
getValuein interfaceEnvironmentVariables
-
getValue
- Specified by:
getValuein interfaceEnvironmentVariables
-
getValue
- Specified by:
getValuein interfaceEnvironmentVariables
-
getKeys
- Specified by:
getKeysin interfaceEnvironmentVariables
-
getProperties
- Specified by:
getPropertiesin interfaceEnvironmentVariables
-
getPropertiesWithPrefix
- Specified by:
getPropertiesWithPrefixin interfaceEnvironmentVariables
-
aValueIsDefinedFor
- Specified by:
aValueIsDefinedForin interfaceEnvironmentVariables
-
aValueIsDefinedFor
- Specified by:
aValueIsDefinedForin interfaceEnvironmentVariables
-
injectSystemPropertiesInto
- Specified by:
injectSystemPropertiesIntoin interfaceEnvironmentVariables
-
getPropertyAsInteger
- Specified by:
getPropertyAsIntegerin interfaceEnvironmentVariables
-
getPropertyAsInteger
- Specified by:
getPropertyAsIntegerin interfaceEnvironmentVariables
-
getPropertyAsBoolean
- Specified by:
getPropertyAsBooleanin interfaceEnvironmentVariables
-
getPropertyAsBoolean
- Specified by:
getPropertyAsBooleanin interfaceEnvironmentVariables
-
getProperty
- Specified by:
getPropertyin interfaceEnvironmentVariables
-
optionalProperty
Description copied from interface:EnvironmentVariablesReturns an optional system property. The property may be defined in the project's serenity.properties or serenity.conf file, or be provided as a a system property. This is designed particularly for user-provided properties, to make it easier to store test confiuration properties in a single file. Sample usage: ``` EnvironmentVariables environmentVariables; String environment = environmentVariables.optionalProperty("env").orElse("DEV") ```- Specified by:
optionalPropertyin interfaceEnvironmentVariables
-
getProperty
- Specified by:
getPropertyin interfaceEnvironmentVariables
-
getProperty
- Specified by:
getPropertyin interfaceEnvironmentVariables
-
getProperty
- Specified by:
getPropertyin interfaceEnvironmentVariables
-
setProperty
- Specified by:
setPropertyin interfaceEnvironmentVariables
-
setProperties
- Specified by:
setPropertiesin interfaceEnvironmentVariables
-
clearProperty
- Specified by:
clearPropertyin interfaceEnvironmentVariables
-
asMap
- Specified by:
asMapin interfaceEnvironmentVariables
-
simpleSystemPropertiesAsMap
- Specified by:
simpleSystemPropertiesAsMapin interfaceEnvironmentVariables
-
copy
- Specified by:
copyin interfaceEnvironmentVariables
-
createEnvironmentVariables
-