Skip to content
Snippets Groups Projects
Commit 4b06c662 authored by Martin Vogel's avatar Martin Vogel
Browse files

fix(config): fix test

parent 891aaed9
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ public final class ApplicationConfigLoader { ...@@ -23,7 +23,7 @@ public final class ApplicationConfigLoader {
*/ */
public static ApplicationConfig loadConfig(final Path configPath) { public static ApplicationConfig loadConfig(final Path configPath) {
try { try {
return loadConfig(Files.readString(configPath)); return loadConfigFromYaml(Files.readString(configPath));
} catch (final IOException | NullPointerException e) { } catch (final IOException | NullPointerException e) {
throw new InitializationException(e.getMessage(), e); throw new InitializationException(e.getMessage(), e);
} }
......
...@@ -33,7 +33,7 @@ class ApplicationConfigLoaderTest { ...@@ -33,7 +33,7 @@ class ApplicationConfigLoaderTest {
// Given // Given
final String testConfigYaml = getResourceAsString("test-config-with-missing-env.yml"); final String testConfigYaml = getResourceAsString("test-config-with-missing-env.yml");
final ApplicationConfig config = ApplicationConfigLoader.loadConfig(testConfigYaml); final ApplicationConfig config = ApplicationConfigLoader.loadConfigFromYaml(testConfigYaml);
//When //When
final InitializationException exception = Assertions.assertThrowsExactly(InitializationException.class, () -> config.getCurrentEnvironment()); final InitializationException exception = Assertions.assertThrowsExactly(InitializationException.class, () -> config.getCurrentEnvironment());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment