mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Merge branch '7.0.x'
This commit is contained in:
+1
-3
@@ -289,7 +289,6 @@ class DefaultClientResponseTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
void createException() {
|
void createException() {
|
||||||
byte[] bytes = "foo".getBytes(StandardCharsets.UTF_8);
|
byte[] bytes = "foo".getBytes(StandardCharsets.UTF_8);
|
||||||
DataBuffer dataBuffer = DefaultDataBufferFactory.sharedInstance.wrap(bytes);
|
DataBuffer dataBuffer = DefaultDataBufferFactory.sharedInstance.wrap(bytes);
|
||||||
@@ -368,7 +367,6 @@ class DefaultClientResponseTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
void createError() {
|
void createError() {
|
||||||
byte[] bytes = "foo".getBytes(StandardCharsets.UTF_8);
|
byte[] bytes = "foo".getBytes(StandardCharsets.UTF_8);
|
||||||
DataBuffer dataBuffer = DefaultDataBufferFactory.sharedInstance.wrap(bytes);
|
DataBuffer dataBuffer = DefaultDataBufferFactory.sharedInstance.wrap(bytes);
|
||||||
@@ -387,7 +385,7 @@ class DefaultClientResponseTests {
|
|||||||
WebClientResponseException exception = (WebClientResponseException) t;
|
WebClientResponseException exception = (WebClientResponseException) t;
|
||||||
assertThat(exception.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
|
assertThat(exception.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
|
||||||
assertThat(exception.getMessage()).isEqualTo("404 Not Found");
|
assertThat(exception.getMessage()).isEqualTo("404 Not Found");
|
||||||
assertThat(exception.getHeaders().containsHeaderValue("Content-Type", "text/plain"));
|
assertThat(exception.getHeaders().containsHeaderValue("Content-Type", "text/plain")).isTrue();
|
||||||
assertThat(exception.getResponseBodyAsByteArray()).isEqualTo(bytes);
|
assertThat(exception.getResponseBodyAsByteArray()).isEqualTo(bytes);
|
||||||
})
|
})
|
||||||
.verify();
|
.verify();
|
||||||
|
|||||||
Reference in New Issue
Block a user