コード例 #1
0
 @Test
 public void testDefaultBanner() throws Exception {
   SpringApplication application = new SpringApplication(Config.class);
   application.setWebEnvironment(false);
   this.context = application.run();
   assertThat(this.out.toString(), containsString(":: Spring Boot ::"));
 }
コード例 #2
0
 @Test
 public void testCustomBanner() throws Exception {
   SpringApplication application = new SpringApplication(Config.class);
   application.setWebEnvironment(false);
   application.setBanner(new DummyBanner());
   this.context = application.run();
   assertThat(this.out.toString(), containsString("My Banner"));
 }