Browse Source

Test updates to work around new behavior.

pull/879/head
spencergibb 1 year ago
parent
commit
413f361f87
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 5
      spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/support/PageJacksonModuleTests.java

5
spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/support/PageJacksonModuleTests.java

@ -28,6 +28,7 @@ import org.junit.jupiter.params.provider.ValueSource; @@ -28,6 +28,7 @@ import org.junit.jupiter.params.provider.ValueSource;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import static org.assertj.core.api.Assertions.assertThat;
@ -69,7 +70,7 @@ public class PageJacksonModuleTests { @@ -69,7 +70,7 @@ public class PageJacksonModuleTests {
@Test
public void serializeAndDeserializeEmpty() throws JsonProcessingException {
// Given
PageImpl<Object> objects = new PageImpl<>(new ArrayList<>());
PageImpl<Object> objects = new PageImpl<>(new ArrayList<>(), Pageable.ofSize(1), 0);
String pageJson = objectMapper.writeValueAsString(objects);
// When
Page<?> result = objectMapper.readValue(pageJson, Page.class);
@ -105,7 +106,7 @@ public class PageJacksonModuleTests { @@ -105,7 +106,7 @@ public class PageJacksonModuleTests {
@Test
public void serializeAndDeserializeEmptyCascade() throws JsonProcessingException {
// Given
PageImpl<Object> objects = new PageImpl<>(new ArrayList<>());
PageImpl<Object> objects = new PageImpl<>(new ArrayList<>(), Pageable.ofSize(1), 0);
String pageJson = objectMapper.writeValueAsString(objects);
// When
Page<?> result = objectMapper.readValue(pageJson, Page.class);

Loading…
Cancel
Save