From db885baaff8580022c93cff73190bf07d5e2fd5c Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Thu, 29 Jul 2021 16:19:23 +0200 Subject: [PATCH] #1590 - Polishing. --- .../HypermediaWebClientBeanPostProcessorTest.java | 13 ++++++------- .../hal/forms/Jackson2HalFormsIntegrationTest.java | 3 --- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/test/java/org/springframework/hateoas/config/HypermediaWebClientBeanPostProcessorTest.java b/src/test/java/org/springframework/hateoas/config/HypermediaWebClientBeanPostProcessorTest.java index a30d3b7e..d75c7181 100644 --- a/src/test/java/org/springframework/hateoas/config/HypermediaWebClientBeanPostProcessorTest.java +++ b/src/test/java/org/springframework/hateoas/config/HypermediaWebClientBeanPostProcessorTest.java @@ -18,15 +18,15 @@ package org.springframework.hateoas.config; import static org.assertj.core.api.Assertions.*; import static org.springframework.hateoas.support.ContextTester.*; +import reactor.test.StepVerifier; + import java.net.URI; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import reactor.test.StepVerifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.ParameterizedTypeReference; import org.springframework.hateoas.EntityModel; import org.springframework.hateoas.Link; import org.springframework.hateoas.MediaTypes; @@ -39,8 +39,9 @@ import org.springframework.hateoas.server.core.TypeReferences.EntityModelType; import org.springframework.web.reactive.function.client.WebClient; /** - * Tests registration of proper decoders by the {@link org.springframework.hateoas.config.WebClientHateoasConfiguration.HypermediaWebClientBeanPostProcessor}. - * + * Tests registration of proper decoders by the + * {@link org.springframework.hateoas.config.WebClientHateoasConfiguration.HypermediaWebClientBeanPostProcessor}. + * * @author Greg Turnquist */ class HypermediaWebClientBeanPostProcessorTest { @@ -104,8 +105,6 @@ class HypermediaWebClientBeanPostProcessorTest { @Test void shouldHandleNavigatingToAResourceObject() { - ParameterizedTypeReference> typeReference = new EntityModelType() {}; - withContext(HalConfig.class, context -> { WebClient webClient = context.getBean(WebClient.class); @@ -123,7 +122,7 @@ class HypermediaWebClientBeanPostProcessorTest { .flatMap(link -> webClient // .get().uri(link.expand().getHref()) // .retrieve() // - .bodyToMono(typeReference)) // + .bodyToMono(new EntityModelType() {})) // .as(StepVerifier::create) // .expectNext(EntityModel.of(new Actor("Keanu Reaves"))) // .verifyComplete(); diff --git a/src/test/java/org/springframework/hateoas/mediatype/hal/forms/Jackson2HalFormsIntegrationTest.java b/src/test/java/org/springframework/hateoas/mediatype/hal/forms/Jackson2HalFormsIntegrationTest.java index a5bea528..2983ab0f 100644 --- a/src/test/java/org/springframework/hateoas/mediatype/hal/forms/Jackson2HalFormsIntegrationTest.java +++ b/src/test/java/org/springframework/hateoas/mediatype/hal/forms/Jackson2HalFormsIntegrationTest.java @@ -308,9 +308,6 @@ class Jackson2HalFormsIntegrationTest { @Test void deserializesMultipleAnnotatedResourceResourcesAsEmbedded() throws Exception { - mapper.readFile("annotated-embedded-resources-reference.json", - CollectionModel.class, EntityModel.class, SimpleAnnotatedPojo.class); - CollectionModel> result = mapper.readFile( "annotated-embedded-resources-reference.json", CollectionModel.class, EntityModel.class, SimpleAnnotatedPojo.class);