Skip to content

Commit e000010

Browse files
committed
add data provided by bjorg to deserializaiton test
1 parent 812a740 commit e000010

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/GraphQL.Client.Serializer.Tests/TestData/DeserializeResponseTestData.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,21 @@ public IEnumerator<object[]> GetEnumerator()
9999
}
100100
})
101101
};
102+
103+
// add test for github issue #230 : https://github.com/graphql-dotnet/graphql-client/issues/230
104+
yield return new object[] {
105+
"{\"data\":{\"getMyModelType\":{\"id\":\"foo\",\"title\":\"The best Foo movie!\"}}}",
106+
new GraphQLResponse<GetMyModelTypeResponse> {
107+
Data = new GetMyModelTypeResponse
108+
{
109+
getMyModelType = new Movie
110+
{
111+
id = "foo",
112+
title = "The best Foo movie!"
113+
}
114+
},
115+
}
116+
};
102117
}
103118

104119
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
@@ -112,4 +127,16 @@ public class Friend
112127
public string Id { get; set; }
113128
public string? Name { get; set; }
114129
}
130+
131+
public class GetMyModelTypeResponse
132+
{
133+
//--- Properties ---
134+
public Movie getMyModelType { get; set; }
135+
}
136+
public class Movie
137+
{
138+
//--- Properties ---
139+
public string id { get; set; }
140+
public string title { get; set; }
141+
}
115142
}

0 commit comments

Comments
 (0)