Skip to content

Commit 3db764f

Browse files
Merge pull request #11 from wiremock/test-formatting
Improve formatting of the unit test
2 parents 1e460c4 + 75abc59 commit 3db764f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/test/java/org/wiremock/integrations/testcontainers/WireMockContainerTest.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void helloWorld() throws Exception {
4242
.header("Content-Type", "application/json")
4343
.GET().build();
4444

45-
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
45+
final HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
4646

4747
assertThat(response.body())
4848
.as("Wrong response body")
@@ -51,18 +51,14 @@ public void helloWorld() throws Exception {
5151

5252
@Test
5353
public void helloWorldFromFile() throws Exception {
54-
final HttpClient client = HttpClient.newBuilder()
55-
.version(HttpClient.Version.HTTP_1_1)
56-
.build();
57-
58-
HttpRequest request = HttpRequest.newBuilder()
54+
final HttpClient client = HttpClient.newBuilder().build();
55+
final HttpRequest request = HttpRequest.newBuilder()
5956
.uri(wiremockServer.getRequestURI("hello-from-file"))
6057
.timeout(Duration.ofSeconds(10))
6158
.header("Content-Type", "application/json")
62-
.GET()
63-
.build();
59+
.GET().build();
6460

65-
HttpResponse<String> response =
61+
final HttpResponse<String> response =
6662
client.send(request, HttpResponse.BodyHandlers.ofString());
6763

6864
assertThat(response.body())

0 commit comments

Comments
 (0)