JAVA-4312: Update deprecations in spring-5-reactive module

This commit is contained in:
sampadawagde
2021-02-01 11:04:42 +05:30
parent 27dfd5ca5a
commit b689760b07
13 changed files with 33 additions and 33 deletions
@@ -1,17 +1,15 @@
package com.baeldung.functional;
import static org.springframework.web.reactive.function.BodyInserters.fromObject;
import static org.springframework.web.reactive.function.BodyInserters.fromValue;
import static org.springframework.web.reactive.function.BodyInserters.fromResource;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.boot.web.server.WebServer;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.http.MediaType;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
@@ -115,7 +113,7 @@ public class FunctionalWebApplicationIntegrationTest {
client.post()
.uri("/actor")
.body(fromObject(new Actor("Clint", "Eastwood")))
.body(fromValue(new Actor("Clint", "Eastwood")))
.exchange()
.expectStatus()
.isOk();
@@ -133,7 +133,7 @@ public class ErrorHandlingIntegrationTest {
.expectStatus()
.isBadRequest()
.expectHeader()
.contentType(MediaType.APPLICATION_JSON_UTF8)
.contentType(MediaType.APPLICATION_JSON)
.expectBody()
.jsonPath("$.message")
.isNotEmpty()
@@ -164,7 +164,7 @@ public class ErrorHandlingIntegrationTest {
.expectStatus()
.isBadRequest()
.expectHeader()
.contentType(MediaType.APPLICATION_JSON_UTF8)
.contentType(MediaType.APPLICATION_JSON)
.expectBody()
.jsonPath("$.message")
.isNotEmpty()