Adjust mock expectations for QuerydslDataFetcher
See gh-71
This commit is contained in:
@@ -73,7 +73,7 @@ class QuerydslDataFetcherTests {
|
||||
MockRepository mockRepository = mock(MockRepository.class);
|
||||
Book book1 = new Book(42L, "Hitchhiker's Guide to the Galaxy", "Douglas Adams");
|
||||
Book book2 = new Book(53L, "Breaking Bad", "Heisenberg");
|
||||
when(mockRepository.findAll((Predicate) null)).thenReturn(Arrays.asList(book1, book2));
|
||||
when(mockRepository.findAll(any(Predicate.class))).thenReturn(Arrays.asList(book1, book2));
|
||||
|
||||
WebGraphQlHandler handler = initWebGraphQlHandler(builder -> builder
|
||||
.dataFetcher("books", QuerydslDataFetcher.builder(mockRepository).many()));
|
||||
@@ -169,7 +169,7 @@ class QuerydslDataFetcherTests {
|
||||
ReactiveMockRepository mockRepository = mock(ReactiveMockRepository.class);
|
||||
Book book1 = new Book(42L, "Hitchhiker's Guide to the Galaxy", "Douglas Adams");
|
||||
Book book2 = new Book(53L, "Breaking Bad", "Heisenberg");
|
||||
when(mockRepository.findAll((Predicate) null)).thenReturn(Flux.just(book1, book2));
|
||||
when(mockRepository.findAll((Predicate) any())).thenReturn(Flux.just(book1, book2));
|
||||
|
||||
WebGraphQlHandler handler = initWebGraphQlHandler(builder -> builder
|
||||
.dataFetcher("books", QuerydslDataFetcher.builder(mockRepository).many()));
|
||||
|
||||
Reference in New Issue
Block a user