Skip to content

Commit bdf14db

Browse files
author
Raul Hidalgo Caballero
committed
.
1 parent 2e839a1 commit bdf14db

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/GraphQL.Client.Tests/GraphQLClientGetTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
using GraphQL.Common.Request;
2+
using GraphQL.Common.Tests.Model;
23
using Xunit;
34

45
namespace GraphQL.Client.Tests {
56

67
public class GraphQLClientGetTests : BaseGraphQLClientTest {
78

89
[Fact]
9-
public async void GetAsyncFact() {
10+
public async void QueryGetAsyncFact() {
1011
var graphQLRequest = new GraphQLRequest { Query = @"
1112
{
1213
person(personID: ""1"") {
@@ -17,6 +18,7 @@ public async void GetAsyncFact() {
1718
var response=await this.GraphQLClient.GetAsync(graphQLRequest).ConfigureAwait(false);
1819

1920
Assert.Equal("Luke Skywalker", response.Data.person.name.Value);
21+
Assert.Equal("Luke Skywalker", response.GetDataFieldAs<Person>("person").Name);
2022
}
2123

2224
}

tests/GraphQL.Client.Tests/GraphQLClientPostTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
using GraphQL.Common.Request;
2+
using GraphQL.Common.Tests.Model;
23
using Xunit;
34

45
namespace GraphQL.Client.Tests {
56

67
public class GraphQLClientPostTests : BaseGraphQLClientTest {
78

89
[Fact]
9-
public async void PostAsyncFact() {
10+
public async void QueryPostAsyncFact() {
1011
var graphQLRequest = new GraphQLRequest { Query = @"
1112
{
1213
person(personID: ""1"") {
@@ -17,6 +18,7 @@ public async void PostAsyncFact() {
1718
var response=await this.GraphQLClient.PostAsync(graphQLRequest).ConfigureAwait(false);
1819

1920
Assert.Equal("Luke Skywalker", response.Data.person.name.Value);
21+
Assert.Equal("Luke Skywalker", response.GetDataFieldAs<Person>("person").Name);
2022
}
2123

2224
}

0 commit comments

Comments
 (0)