Skip to content

Instantly share code, notes, and snippets.

@paulbakker
Last active February 2, 2021 20:27
Show Gist options
  • Save paulbakker/6224cd7f3318f375f2a7993ec869cfd5 to your computer and use it in GitHub Desktop.
Save paulbakker/6224cd7f3318f375f2a7993ec869cfd5 to your computer and use it in GitHub Desktop.
@SpringBootTest(classes = {DgsAutoConfiguration.class, ShowsDatafetcher.class})
class ShowsDatafetcherTest {
@Autowired
DgsQueryExecutor dgsQueryExecutor;
@Test
void shows() {
List<String> titles = dgsQueryExecutor.executeAndExtractJsonPath(
" { shows { title releaseYear }}",
"data.shows[*].title");
assertThat(titles).contains("Ozark");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment