File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
tests/GraphQL.Client.Tests Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11using GraphQL . Common . Request ;
2+ using GraphQL . Common . Tests . Model ;
23using Xunit ;
34
45namespace 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 }
Original file line number Diff line number Diff line change 11using GraphQL . Common . Request ;
2+ using GraphQL . Common . Tests . Model ;
23using Xunit ;
34
45namespace 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 }
You can’t perform that action at this time.
0 commit comments