Fixed the build

This commit is contained in:
Marcin Grzejszczak
2019-04-26 16:32:31 +04:00
parent 81c6560180
commit 2475abfa8b
6 changed files with 55 additions and 31 deletions

View File

@@ -18,7 +18,6 @@ package com.example;
import com.github.tomakehurst.wiremock.http.Fault;
import com.github.tomakehurst.wiremock.junit.WireMockClassRule;
import org.apache.http.MalformedChunkCodingException;
import org.apache.http.NoHttpResponseException;
import org.apache.http.client.ClientProtocolException;
import org.junit.ClassRule;
@@ -81,7 +80,7 @@ public class WiremockServerApplicationTests {
public void malformed() throws Exception {
stubFor(get(urlEqualTo("/resource"))
.willReturn(aResponse().withFault(Fault.MALFORMED_RESPONSE_CHUNK)));
this.expected.expectCause(instanceOf(MalformedChunkCodingException.class));
this.expected.expectCause(instanceOf(ClientProtocolException.class));
assertThat(this.service.go()).isEqualTo("Oops!");
}

View File

@@ -84,7 +84,6 @@ public class WiremockServerApplicationTests {
.willReturn(aResponse().withFault(Fault.MALFORMED_RESPONSE_CHUNK)));
// It's a different exception type than Jetty, but it's in the right ballpark
this.expected.expectCause(instanceOf(IOException.class));
this.expected.expectMessage("chunk");
assertThat(this.service.go()).isEqualTo("Oops!");
}