Skip to content

Commit 46221c6

Browse files
committed
Adjust mock expectations for QuerydslDataFetcher
See gh-71
1 parent eef6184 commit 46221c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-graphql/src/test/java/org/springframework/graphql/data/QuerydslDataFetcherTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void shouldFetchMultipleItems() {
7373
MockRepository mockRepository = mock(MockRepository.class);
7474
Book book1 = new Book(42L, "Hitchhiker's Guide to the Galaxy", "Douglas Adams");
7575
Book book2 = new Book(53L, "Breaking Bad", "Heisenberg");
76-
when(mockRepository.findAll((Predicate) null)).thenReturn(Arrays.asList(book1, book2));
76+
when(mockRepository.findAll(any(Predicate.class))).thenReturn(Arrays.asList(book1, book2));
7777

7878
WebGraphQlHandler handler = initWebGraphQlHandler(builder -> builder
7979
.dataFetcher("books", QuerydslDataFetcher.builder(mockRepository).many()));
@@ -169,7 +169,7 @@ void shouldReactivelyFetchMultipleItems() {
169169
ReactiveMockRepository mockRepository = mock(ReactiveMockRepository.class);
170170
Book book1 = new Book(42L, "Hitchhiker's Guide to the Galaxy", "Douglas Adams");
171171
Book book2 = new Book(53L, "Breaking Bad", "Heisenberg");
172-
when(mockRepository.findAll((Predicate) null)).thenReturn(Flux.just(book1, book2));
172+
when(mockRepository.findAll((Predicate) any())).thenReturn(Flux.just(book1, book2));
173173

174174
WebGraphQlHandler handler = initWebGraphQlHandler(builder -> builder
175175
.dataFetcher("books", QuerydslDataFetcher.builder(mockRepository).many()));

0 commit comments

Comments
 (0)