This commit is contained in:
Andy Wilkinson
2017-11-11 16:29:12 +00:00
parent 89173bd227
commit 07462be090
17 changed files with 46 additions and 35 deletions

View File

@@ -54,7 +54,8 @@ public class TestPropertyValuesTests {
@Test
public void applyToSystemPropertySource() throws Exception {
TestPropertyValues.of("FOO_BAR=BAZ").applyTo(this.environment, Type.SYSTEM_ENVIRONMENT);
TestPropertyValues.of("FOO_BAR=BAZ").applyTo(this.environment,
Type.SYSTEM_ENVIRONMENT);
assertThat(this.environment.getProperty("foo.bar")).isEqualTo("BAZ");
assertThat(this.environment.getPropertySources().contains(
"test-" + StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME));
@@ -72,8 +73,8 @@ public class TestPropertyValuesTests {
throws Exception {
TestPropertyValues.of("foo.bar=baz", "hello.world=hi").applyTo(this.environment,
Type.MAP, "other");
TestPropertyValues.of("FOO_BAR=BAZ").applyTo(this.environment, Type.SYSTEM_ENVIRONMENT,
"other");
TestPropertyValues.of("FOO_BAR=BAZ").applyTo(this.environment,
Type.SYSTEM_ENVIRONMENT, "other");
assertThat(this.environment.getPropertySources().get("other"))
.isInstanceOf(SystemEnvironmentPropertySource.class);
assertThat(this.environment.getProperty("foo.bar")).isEqualTo("BAZ");