Search in sources :

Example 1 with Droid

use of com.generated.graphql.Droid in project graphql-maven-plugin-project by graphql-java-generator.

the class AbstractIT method test_droidPartial.

@Test
void test_droidPartial() throws GraphQLRequestExecutionException, GraphQLRequestPreparationException {
    // queryType.droid("{id appearsIn primaryFunction name}", "3");
    Droid d = queries.droidPartial("00000000-0000-0000-0000-000000000003");
    checkCharacter(d, "droidSimple", null, "C-3PO", 0, Episode.EMPIRE);
    assertEquals("Function of C-3PO", d.getPrimaryFunction());
}
Also used : Droid(com.generated.graphql.Droid) Test(org.junit.jupiter.api.Test)

Example 2 with Droid

use of com.generated.graphql.Droid in project graphql-maven-plugin-project by graphql-java-generator.

the class AbstractIT method test_droidFull.

@Test
void test_droidFull() throws GraphQLRequestExecutionException, GraphQLRequestPreparationException {
    // queryType.droid("{id appearsIn primaryFunction name}", "3");
    Droid d = queries.droidFull("00000000-0000-0000-0000-000000000003");
    checkCharacter(d, "droidSimple", "00000000-0000-0000-0000-000000000003", "C-3PO", 0, Episode.EMPIRE);
    assertEquals("Function of C-3PO", d.getPrimaryFunction());
}
Also used : Droid(com.generated.graphql.Droid) Test(org.junit.jupiter.api.Test)

Example 3 with Droid

use of com.generated.graphql.Droid in project graphql-maven-plugin-project by graphql-java-generator.

the class AbstractIT method test_droidFriendsFriendsFriends.

@Test
void test_droidFriendsFriendsFriends() throws GraphQLRequestExecutionException, GraphQLRequestPreparationException {
    // droid("{id appearsIn name friends {name friends {friends{id name appearsIn}}}
    // primaryFunction }", "2");
    Droid d = queries.droidFriendsFriendsFriends("00000000-0000-0000-0000-000000000002");
    checkCharacter(d, "testDroidFriendsFriendsFriends", "00000000-0000-0000-0000-000000000002", "BB-8", 2, Episode.NEWHOPE);
    assertEquals("Function of BB-8", d.getPrimaryFunction());
    // "52", "Poe Dameron"
    Character friends_0 = d.getFriends().get(0);
    checkCharacter(friends_0, "testDroidFriendsFriendsFriends[friends_0]", null, "Poe Dameron", 0);
    // "180", "Luke Skywalker"
    Character friends_1 = d.getFriends().get(1);
    checkCharacter(friends_1, "testDroidFriendsFriendsFriends[friends_1]", null, "Luke Skywalker", 2);
}
Also used : Character(com.generated.graphql.Character) Droid(com.generated.graphql.Droid) Test(org.junit.jupiter.api.Test)

Aggregations

Droid (com.generated.graphql.Droid)3 Test (org.junit.jupiter.api.Test)3 Character (com.generated.graphql.Character)1