spring-boot/spring-boot-project/spring-boot-cli/test-samples/integration_auto.groovy
Stephane Nicoll f33c7bc27c Polish "Remove unnecessary semicolon"
See gh-24628
2021-01-05 08:24:03 +01:00

22 lines
390 B
Groovy

package com.example
@SpringBootApplication
@SpringBootTest(classes=RestTests, webEnvironment=WebEnvironment.RANDOM_PORT)
class RestTests {
@Autowired
TestRestTemplate testRestTemplate
@Test
void testHome() {
assertEquals('Hello', testRestTemplate.getForObject('/', String))
}
@RestController
static class Application {
@RequestMapping('/')
String hello() { 'Hello' }
}
}