diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java index bc40767515a..429a7e93857 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java @@ -96,7 +96,7 @@ public class TestCommandIntegrationTests { @Test public void integrationAutoConfigTest() throws Exception { - String output = this.cli.test("integration_auto_test.groovy", "jms.groovy"); + String output = this.cli.test("integration_auto_test.groovy", "app.groovy"); assertThat(output).contains("OK (1 test)"); } diff --git a/spring-boot-cli/test-samples/app.groovy b/spring-boot-cli/test-samples/app.groovy new file mode 100644 index 00000000000..3182af1dfa2 --- /dev/null +++ b/spring-boot-cli/test-samples/app.groovy @@ -0,0 +1,17 @@ +@Configuration +class App { + + @Bean + MyService myService() { + return new MyService() + } + +} + +class MyService { + + String sayWorld() { + return "World!" + } + +} \ No newline at end of file diff --git a/spring-boot-cli/test-samples/integration_auto_test.groovy b/spring-boot-cli/test-samples/integration_auto_test.groovy index 91e22e28ca7..b5ac561cd4b 100644 --- a/spring-boot-cli/test-samples/integration_auto_test.groovy +++ b/spring-boot-cli/test-samples/integration_auto_test.groovy @@ -1,14 +1,12 @@ -import org.springframework.jms.core.JmsTemplate - -@SpringBootTest(classes=JmsExample) -class JmsTests { +@SpringBootTest(classes=App) +class AppTests { @Autowired - JmsTemplate jmsTemplate + MyService myService @Test void test() { - assertNotNull(jmsTemplate) + assertNotNull(myService) } }