Skip to content

Commit

Permalink
Improve ensuresManagerParametersOverridesCustomConfigurationProvider …
Browse files Browse the repository at this point in the history
…test
  • Loading branch information
derTobsch committed Jan 13, 2025
1 parent 87e1db4 commit 3a8c987
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void setUp() {
}

@Test
void ensuresUrlConfigurationProviderOverridesClasspathConfigurationProvider() {
void ensuresUrlConfigurationProviderOverridesBaseClasspathConfigurationProvider() {
System.setProperty(CONFIG_URLS_PROPERTY, "file:./src/test/resources/URLConfigurationProviderTest.properties");
System.clearProperty(CONFIG_PROVIDERS_PROPERTY);

Expand Down Expand Up @@ -56,13 +56,13 @@ void ensuresManagerParametersOverridesCustomConfigurationProvider() {
System.setProperty(CONFIG_PROVIDERS_PROPERTY, "de.focus_shift.jollyday.core.configuration.ConfigurationProviderManagerTest$CustomConfigurationProvider");

final ManagerParameter managerParameter = ManagerParameters.create((String) null);
managerParameter.setProperty("MANUAL_KEY", "MANUAL_VALUE");
managerParameter.setProperty("manager.impl", "NewImpl");
managerParameter.setProperty("manager.impl", "ManagerParameterOverloaded");
managerParameter.setProperty("manager.impl.manager", "ManagerParameterOverloaded.manager");

sut.mergeConfigurationProperties(managerParameter);

assertThat(managerParameter.getProperty("MANUAL_KEY")).isEqualTo("MANUAL_VALUE");
assertThat(managerParameter.getProperty("manager.impl")).isEqualTo("NewImpl");
assertThat(managerParameter.getProperty("manager.impl")).isEqualTo("ManagerParameterOverloaded");
assertThat(managerParameter.getProperty("manager.impl.manager")).isEqualTo("ManagerParameterOverloaded.manager");

System.clearProperty(CONFIG_URLS_PROPERTY);
System.clearProperty(CONFIG_PROVIDERS_PROPERTY);
Expand Down

0 comments on commit 3a8c987

Please sign in to comment.