Remove a redundant dash in TestPropertyValues.Type

Prior to this change, the dash was duplicated. For example
"test--systemEnvironment". This commit removes the redundant dash
and corrects the assertion in the test that should have caught the
problem.

See gh-11156
This commit is contained in:
Johnny Lim 2017-11-27 00:05:50 +09:00 committed by Andy Wilkinson
parent a39251a3df
commit f21737a675
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ public final class TestPropertyValues {
Type(Class<? extends MapPropertySource> sourceClass, String suffix) {
this.sourceClass = sourceClass;
this.suffix = (suffix == null ? null : "-" + suffix);
this.suffix = suffix;
}
public Class<? extends MapPropertySource> getSourceClass() {

View File

@ -58,7 +58,7 @@ public class TestPropertyValuesTests {
Type.SYSTEM_ENVIRONMENT);
assertThat(this.environment.getProperty("foo.bar")).isEqualTo("BAZ");
assertThat(this.environment.getPropertySources().contains(
"test-" + StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME));
"test-" + StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME)).isTrue();
}
@Test