Fix failing tests

This commit is contained in:
Rossen Stoyanchev 2018-06-18 20:20:32 -04:00
parent 28a5c3009e
commit 03c305136d
3 changed files with 5 additions and 4 deletions

View File

@ -88,7 +88,8 @@ public class DispatcherHandlerErrorTests {
StepVerifier.create(publisher)
.consumeErrorWith(error -> {
assertThat(error, instanceOf(ResponseStatusException.class));
assertThat(error.getMessage(), is("Response status 404 with reason \"No matching handler\""));
assertThat(error.getMessage(),
is("Response status 404 NOT_FOUND with reason \"No matching handler\""));
})
.verify();
}

View File

@ -176,7 +176,7 @@ public class InvocableHandlerMethodTests {
fail("Expected UnsupportedMediaTypeStatusException");
}
catch (UnsupportedMediaTypeStatusException ex) {
assertThat(ex.getMessage(), is("Response status 415 with reason \"boo\""));
assertThat(ex.getMessage(), is("Response status 415 UNSUPPORTED_MEDIA_TYPE with reason \"boo\""));
}
}

View File

@ -170,8 +170,8 @@ public class RequestMappingInfoHandlerMappingTests {
Mono<Object> mono = this.handlerMapping.getHandler(exchange);
assertError(mono, UnsupportedMediaTypeStatusException.class,
ex -> assertEquals("Response status 415 with reason \"Invalid mime type \"bogus\": " +
"does not contain '/'\"", ex.getMessage()));
ex -> assertEquals("Response status 415 UNSUPPORTED_MEDIA_TYPE with reason " +
"\"Invalid mime type \"bogus\": does not contain '/'\"", ex.getMessage()));
}
@Test // SPR-8462