Class ConfigUtilTest


  • @ManualTest
    public class ConfigUtilTest
    extends java.lang.Object
    • Constructor Detail

      • ConfigUtilTest

        public ConfigUtilTest()
    • Method Detail

      • createTempPropertiesFile

        public void createTempPropertiesFile()
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • deleteTempPropertiesFile

        public void deleteTempPropertiesFile()
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • loadFromUTF8Properties

        public void loadFromUTF8Properties()
                                    throws java.io.IOException
        UTF-8 encoded property files should be supported
        Throws:
        java.io.IOException
      • loadFromPropertiesWithUnsupportedEncoding

        public void loadFromPropertiesWithUnsupportedEncoding()
                                                       throws java.io.IOException
        When the requested encoding is not supported, property files should be read with default ISO 8859-1 encoding and not cause an exception.
        Throws:
        java.io.IOException
      • loadFromUTF8PropertiesWithWrongConfig

        public void loadFromUTF8PropertiesWithWrongConfig()
                                                   throws java.io.IOException
        Using an incorrect encoding should cause failure when reading property files.
        Throws:
        java.io.IOException
      • loadAdditionalRuntimeProperties

        public void loadAdditionalRuntimeProperties()
      • loadOptionalConfig

        public void loadOptionalConfig()
      • loadOptionalConfigViaEnvVariable

        public void loadOptionalConfigViaEnvVariable()
      • shouldLogOnlyOnceUsageOfOptionalPropertiesEnvVariable

        public void shouldLogOnlyOnceUsageOfOptionalPropertiesEnvVariable()
      • loadFromEnv

        public void loadFromEnv()
      • getPropertyOrEnvShouldReturnNullIfNotSet

        public void getPropertyOrEnvShouldReturnNullIfNotSet()
      • getPropertyOrEnvShouldReturnPropertyIfSet

        public void getPropertyOrEnvShouldReturnPropertyIfSet()
      • getPropertyOrEnvShouldReturnEnvIfSet

        public void getPropertyOrEnvShouldReturnEnvIfSet()
      • getPropertyOrEnvShouldPreferEnvToProperty

        public void getPropertyOrEnvShouldPreferEnvToProperty()
      • shouldOverwritePropertiesFromEnvs

        public void shouldOverwritePropertiesFromEnvs()
      • shouldOverwritePropertiesFromProperties

        public void shouldOverwritePropertiesFromProperties()