Add missing fail() calls in MockRestServiceServerTests
Closes gh-22836
This commit is contained in:
committed by
Stephane Nicoll
parent
ad497c259a
commit
33ac14f099
@@ -126,6 +126,7 @@ public class MockRestServiceServerTests {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
this.restTemplate.getForEntity("/some-service/some-endpoint", String.class);
|
this.restTemplate.getForEntity("/some-service/some-endpoint", String.class);
|
||||||
|
fail("Expected exception to be thrown.");
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
this.restTemplate.postForEntity("/reporting-service/report-error", ex.toString(), String.class);
|
this.restTemplate.postForEntity("/reporting-service/report-error", ex.toString(), String.class);
|
||||||
@@ -142,6 +143,7 @@ public class MockRestServiceServerTests {
|
|||||||
this.restTemplate.postForEntity("/remoteurl", null, String.class);
|
this.restTemplate.postForEntity("/remoteurl", null, String.class);
|
||||||
try {
|
try {
|
||||||
this.restTemplate.postForEntity("/remoteurl", null, String.class);
|
this.restTemplate.postForEntity("/remoteurl", null, String.class);
|
||||||
|
fail("Expected error to be thrown.");
|
||||||
}
|
}
|
||||||
catch (AssertionError error) {
|
catch (AssertionError error) {
|
||||||
assertThat(error.getMessage()).startsWith("No further requests expected");
|
assertThat(error.getMessage()).startsWith("No further requests expected");
|
||||||
|
|||||||
Reference in New Issue
Block a user