Polishing

This commit is contained in:
Juergen Hoeller
2014-08-12 22:24:50 +02:00
parent 3038f03fee
commit 0c89279d61
10 changed files with 100 additions and 85 deletions

View File

@@ -204,6 +204,17 @@ public class StandardEnvironmentTests {
System.getProperties().remove(DEFAULT_PROFILES_PROPERTY_NAME);
}
@Test(expected=IllegalArgumentException.class)
public void defaultProfileWithCircularPlaceholder() {
System.setProperty(DEFAULT_PROFILES_PROPERTY_NAME, "${spring.profiles.default}");
try {
environment.getDefaultProfiles();
}
finally {
System.getProperties().remove(DEFAULT_PROFILES_PROPERTY_NAME);
}
}
@Test
public void getActiveProfiles_systemPropertiesEmpty() {
assertThat(environment.getActiveProfiles().length, is(0));