Checkstyle and jdk11 fix with spock

This commit is contained in:
Marcin Grzejszczak
2018-10-05 10:44:28 +02:00
parent 27652ade37
commit 8da2e4ee57
220 changed files with 3214 additions and 1977 deletions

View File

@@ -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();
}
}

View File

@@ -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!");
}