application.setWebEnvironment(false);
application.setAdditionalProfiles("foo");
ConfigurableEnvironment environment = new StandardEnvironment();
application.setEnvironment(environment);
application.run();
assertTrue(environment.acceptsProfiles("foo"));
}
@Test
public void addProfilesOrder() throws Exception {
SpringApplication application = new SpringApplication(ExampleConfig.class);