Interface EnvironmentVariables

    • Method Detail

      • getPropertyAsInteger

        Integer getPropertyAsInteger​(Enum<?> property,
                                     Integer defaultValue)
      • getPropertyAsBoolean

        Boolean getPropertyAsBoolean​(String name,
                                     boolean defaultValue)
      • getPropertyAsBoolean

        Boolean getPropertyAsBoolean​(Enum<?> property,
                                     boolean defaultValue)
      • 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") ```
      • getProperty

        String getProperty​(Enum<?> property)
      • setProperty

        void setProperty​(String name,
                         String value)
      • clearProperty

        void clearProperty​(String name)
      • getPropertiesWithPrefix

        Properties getPropertiesWithPrefix​(String prefix)
      • aValueIsDefinedFor

        boolean aValueIsDefinedFor​(Enum<?> property)
      • aValueIsDefinedFor

        boolean aValueIsDefinedFor​(String property)
      • injectSystemPropertiesInto

        String injectSystemPropertiesInto​(String value)
      • simpleSystemPropertiesAsMap

        Map<String,​String> simpleSystemPropertiesAsMap()