Package net.thucydides.core.util
Interface EnvironmentVariables
-
- All Known Implementing Classes:
MockEnvironmentVariables
,SystemEnvironmentVariables
public interface EnvironmentVariables
Return system environment variable values.
-
-
Method Summary
-
-
-
Method Detail
-
optionalProperty
Optional<String> optionalProperty(String name)
Returns 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") ```
-
clearProperty
void clearProperty(String name)
-
copy
EnvironmentVariables copy()
-
getProperties
Properties getProperties()
-
getPropertiesWithPrefix
Properties getPropertiesWithPrefix(String prefix)
-
aValueIsDefinedFor
boolean aValueIsDefinedFor(Enum<?> property)
-
aValueIsDefinedFor
boolean aValueIsDefinedFor(String property)
-
-