Created
April 12, 2021 20:33
-
-
Save dannyshain/66f0f26f272221aac755248fc9bd8c36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void getCompanyData_checkCeo_shouldBeElonMusk() { | |
GraphQLQuery query = new GraphQLQuery(); | |
query.setQuery("{ company { name ceo coo } }"); | |
given(). | |
contentType(ContentType.JSON). | |
body(query). | |
when(). | |
post("https://api.spacex.land/graphql/"). | |
then(). | |
assertThat(). | |
statusCode(200). | |
and(). | |
body("data.company.ceo", equalTo("Elon Musk")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment