parent
f1f36cd002
commit
3d99a5dd98
|
|
@ -110,6 +110,13 @@ public class SpringApplicationTests {
|
|||
new SpringApplication().run();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sourcesMustBeAccessible() throws Exception {
|
||||
this.thrown.expect(IllegalStateException.class);
|
||||
this.thrown.expectMessage("Cannot load configuration");
|
||||
new SpringApplication(InaccessibleConfiguration.class).run();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void disableBanner() throws Exception {
|
||||
SpringApplication application = spy(new SpringApplication(ExampleConfig.class));
|
||||
|
|
@ -269,7 +276,7 @@ public class SpringApplicationTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void proprtiesFileEnhancesEnvironment() throws Exception {
|
||||
public void propertiesFileEnhancesEnvironment() throws Exception {
|
||||
SpringApplication application = new SpringApplication(ExampleConfig.class);
|
||||
application.setWebEnvironment(false);
|
||||
ConfigurableEnvironment environment = new StandardEnvironment();
|
||||
|
|
@ -468,6 +475,14 @@ public class SpringApplicationTests {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Configuration
|
||||
protected static class InaccessibleConfiguration {
|
||||
|
||||
private InaccessibleConfiguration() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class SpyApplicationContext extends AnnotationConfigApplicationContext {
|
||||
|
||||
ConfigurableApplicationContext applicationContext = spy(new AnnotationConfigApplicationContext());
|
||||
|
|
|
|||
Loading…
Reference in New Issue