Add extra test for placeholder behaviour

This commit is contained in:
Dave Syer
2013-10-14 11:16:00 -04:00
parent efb66dcdb2
commit 17e24fd17d
2 changed files with 9 additions and 0 deletions

View File

@@ -104,6 +104,14 @@ public class ConfigFileApplicationContextInitializerTests {
assertThat(property, equalTo("fromprofilepropertiesfile"));
}
@Test
public void profilePropertiesUsedInPlaceholders() throws Exception {
this.initializer.setNames("enableprofile");
this.initializer.initialize(this.context);
String property = this.context.getEnvironment().getProperty("one.more");
assertThat(property, equalTo("fromprofilepropertiesfile"));
}
@Test
public void yamlProfiles() throws Exception {
this.initializer.setNames("testprofiles");

View File

@@ -1,2 +1,3 @@
spring.profiles.active=myprofile
my.property=frompropertiesfile
one.more=${my.property}