Package de.hybris.bootstrap.config
Class ConfigUtilTest
- java.lang.Object
-
- de.hybris.bootstrap.config.ConfigUtilTest
-
@ManualTest public class ConfigUtilTest extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ConfigUtilTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateTempPropertiesFile()voiddeleteTempPropertiesFile()voidgetPropertyOrEnvShouldPreferEnvToProperty()voidgetPropertyOrEnvShouldReturnEnvIfSet()voidgetPropertyOrEnvShouldReturnNullIfNotSet()voidgetPropertyOrEnvShouldReturnPropertyIfSet()voidloadAdditionalRuntimeProperties()voidloadFromEnv()voidloadFromPropertiesWithUnsupportedEncoding()When the requested encoding is not supported, property files should be read with default ISO 8859-1 encoding and not cause an exception.voidloadFromUTF8Properties()UTF-8 encoded property files should be supportedvoidloadFromUTF8PropertiesWithWrongConfig()Using an incorrect encoding should cause failure when reading property files.voidloadOptionalConfig()voidloadOptionalConfigViaEnvVariable()voidshouldLogOnlyOnceUsageOfOptionalPropertiesEnvVariable()voidshouldOverwritePropertiesFromEnvs()voidshouldOverwritePropertiesFromProperties()
-
-
-
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.IOExceptionUTF-8 encoded property files should be supported- Throws:
java.io.IOException
-
loadFromPropertiesWithUnsupportedEncoding
public void loadFromPropertiesWithUnsupportedEncoding() throws java.io.IOExceptionWhen 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.IOExceptionUsing 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()
-
-