Skip to content

Commit

Permalink
Merge pull request #148 from ehsaniara/main
Browse files Browse the repository at this point in the history
Rename ShowsDataFetcher class to its own java file name
  • Loading branch information
kilink authored Jan 28, 2024
2 parents 34c9fff + eff61b9 commit d25df80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
import java.util.stream.Collectors;

@DgsComponent
public class ShowsDatafetcher {
public class ShowsDataFetcher {
private final ShowsService showsService;

public ShowsDatafetcher(ShowsService showsService) {
public ShowsDataFetcher(ShowsService showsService) {
this.showsService = showsService;
}

/**
* This datafetcher resolves the shows field on Query.
* This dataFetcher resolves the shows field on Query.
* It uses an @InputArgument to get the titleFilter from the Query if one is defined.
*/
@DgsQuery
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.example.demo;

import com.example.demo.datafetchers.ReviewsDataFetcher;
import com.example.demo.datafetchers.ShowsDatafetcher;
import com.example.demo.datafetchers.ShowsDataFetcher;
import com.example.demo.dataloaders.ReviewsDataLoader;
import com.example.demo.dataloaders.ReviewsDataLoaderWithContext;
import com.example.demo.generated.client.*;
Expand All @@ -28,14 +28,13 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.verify;


@SpringBootTest(classes = {DgsAutoConfiguration.class, ReviewsDataLoaderWithContext.class, ShowsDatafetcher.class, ReviewsDataFetcher.class, ReviewsDataLoader.class, DateTimeScalar.class})
class ShowsDatafetcherTest {
@SpringBootTest(classes = {DgsAutoConfiguration.class, ReviewsDataLoaderWithContext.class, ShowsDataFetcher.class, ReviewsDataFetcher.class, ReviewsDataLoader.class, DateTimeScalar.class})
class ShowsDataFetcherTest {

@Autowired
DgsQueryExecutor dgsQueryExecutor;
Expand Down Expand Up @@ -137,4 +136,4 @@ void addReviewsMutation() {

verify(reviewsService).reviewsForShows(Collections.singletonList(1));
}
}
}

0 comments on commit d25df80

Please sign in to comment.