Checkstyle and jdk11 fix with spock
This commit is contained in:
@@ -20,6 +20,7 @@ public class WiremockTestsApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(WiremockTestsApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@RestController
|
||||
@@ -35,6 +36,7 @@ class Controller {
|
||||
public String home() {
|
||||
return this.service.go();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Component
|
||||
@@ -50,6 +52,8 @@ class Service {
|
||||
}
|
||||
|
||||
public String go() {
|
||||
return this.restTemplate.getForEntity(this.base + "/resource", String.class).getBody();
|
||||
return this.restTemplate.getForEntity(this.base + "/resource", String.class)
|
||||
.getBody();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import com.github.tomakehurst.wiremock.junit.WireMockClassRule;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(properties="app.baseUrl=http://localhost:6063", webEnvironment=WebEnvironment.NONE)
|
||||
@SpringBootTest(properties = "app.baseUrl=http://localhost:6063", webEnvironment = WebEnvironment.NONE)
|
||||
public class WiremockServerApplicationTests {
|
||||
|
||||
@ClassRule
|
||||
@@ -28,8 +28,8 @@ public class WiremockServerApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() throws Exception {
|
||||
stubFor(get(urlEqualTo("/resource"))
|
||||
.willReturn(aResponse().withHeader("Content-Type", "text/plain").withBody("Hello World!")));
|
||||
stubFor(get(urlEqualTo("/resource")).willReturn(aResponse()
|
||||
.withHeader("Content-Type", "text/plain").withBody("Hello World!")));
|
||||
assertThat(this.service.go()).isEqualTo("Hello World!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user