|
|
|
|
@ -318,6 +318,17 @@ public class ConfigFileApplicationListenerTests {
@@ -318,6 +318,17 @@ public class ConfigFileApplicationListenerTests {
|
|
|
|
|
assertThat(property, equalTo("notempty")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void yamlTwoProfiles() throws Exception { |
|
|
|
|
this.initializer.setSearchNames("testprofiles"); |
|
|
|
|
this.environment.setActiveProfiles("other", "dev"); |
|
|
|
|
this.initializer.onApplicationEvent(this.event); |
|
|
|
|
String property = this.environment.getProperty("my.property"); |
|
|
|
|
assertThat(property, equalTo("fromotherprofile")); |
|
|
|
|
property = this.environment.getProperty("my.other"); |
|
|
|
|
assertThat(property, equalTo("notempty")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void yamlSetsProfiles() throws Exception { |
|
|
|
|
this.initializer.setSearchNames("testsetprofiles"); |
|
|
|
|
|