Skip to content

Commit

Permalink
Test updates to work around new behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
spencergibb committed Jul 6, 2023
1 parent 8020b88 commit 413f361
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
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;

Expand Down Expand Up @@ -69,7 +70,7 @@ public void deserializePage(String totalElements) throws JsonProcessingException
@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);
Expand Down Expand Up @@ -105,7 +106,7 @@ public void serializeAndDeserializeFilledMultiple() throws JsonProcessingExcepti
@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);
Expand Down

0 comments on commit 413f361

Please sign in to comment.