Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,23 @@ public async Task Get_related_to_many_included()
}
}


[TestMethod]
[DeploymentItem(@"Data\Comment.csv", @"Data")]
[DeploymentItem(@"Data\Post.csv", @"Data")]
[DeploymentItem(@"Data\PostTagLink.csv", @"Data")]
[DeploymentItem(@"Data\Tag.csv", @"Data")]
[DeploymentItem(@"Data\User.csv", @"Data")]
public async Task Get_related_to_many_included_external()
{
using (var effortConnection = GetEffortConnection())
{
var response = await SubmitGet(effortConnection, "users/401/posts?include=tags");

await AssertResponseContent(response, @"Fixtures\FetchingResources\Get_related_to_many_include_external_response.json", HttpStatusCode.OK);
}
}

[TestMethod]
[DeploymentItem(@"Data\Comment.csv", @"Data")]
[DeploymentItem(@"Data\Post.csv", @"Data")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,89 +1,110 @@
{
"data": [
{
"type": "samples",
"id": "1",
"attributes": {
"boolean-field": false,
"byte-field": 0,
"complex-attribute-field": null,
"date-time-field": "0001-01-01T00:00:00",
"date-time-offset-field": "0001-01-01T00:00:00.0000000+00:00",
"decimal-field": "0",
"double-field": 0.0,
"enum-field": 0,
"guid-field": "00000000-0000-0000-0000-000000000000",
"int16-field": 0,
"int32-field": 0,
"int64-field": 0,
"nullable-boolean-field": false,
"nullable-byte-field": null,
"nullable-date-time-field": null,
"nullable-date-time-offset-field": null,
"nullable-decimal-field": null,
"nullable-double-field": null,
"nullable-enum-field": null,
"nullable-guid-field": null,
"nullable-int16-field": null,
"nullable-int32-field": null,
"nullable-int64-field": null,
"nullable-sbyte-field": null,
"nullable-single-field": null,
"nullable-uint16-field": null,
"nullable-uint32-field": null,
"nullable-uint64-field": null,
"sbyte-field": 0,
"single-field": 0.0,
"string-field": null,
"uint16-field": 0,
"uint32-field": 0,
"uint64-field": 0
}
"data": [
{
"type": "samples",
"id": "1",
"attributes": {
"boolean-field": false,
"byte-field": 0,
"complex-attribute-field": null,
"date-time-field": "0001-01-01T00:00:00",
"date-time-offset-field": "0001-01-01T00:00:00.0000000+00:00",
"decimal-field": "0",
"double-field": 0.0,
"enum-field": 0,
"guid-field": "00000000-0000-0000-0000-000000000000",
"int16-field": 0,
"int32-field": 0,
"int64-field": 0,
"j-token-array-field": null,
"j-token-object-field": null,
"j-token-string-field": null,
"nullable-boolean-field": false,
"nullable-byte-field": null,
"nullable-date-time-field": null,
"nullable-date-time-offset-field": null,
"nullable-decimal-field": null,
"nullable-double-field": null,
"nullable-enum-field": null,
"nullable-guid-field": null,
"nullable-int16-field": null,
"nullable-int32-field": null,
"nullable-int64-field": null,
"nullable-sbyte-field": null,
"nullable-single-field": null,
"nullable-uint16-field": null,
"nullable-uint32-field": null,
"nullable-uint64-field": null,
"sbyte-field": 0,
"single-field": 0.0,
"string-field": null,
"uint16-field": 0,
"uint32-field": 0,
"uint64-field": 0
}
},
{
"type": "samples",
"id": "2",
"attributes": {
"boolean-field": true,
"byte-field": 253,
"complex-attribute-field": {
"foo": {
"baz": [ 11 ]
},
"bar": 5
},
{
"type": "samples",
"id": "2",
"attributes": {
"boolean-field": true,
"byte-field": 253,
"complex-attribute-field": {
"foo": {
"baz": [ 11 ]
},
"bar": 5
},
"date-time-field": "1776-07-04T00:00:00",
"date-time-offset-field": "1776-07-04T00:00:00.0000000-05:00",
"decimal-field": "1056789.123",
"double-field": 1056789.123,
"enum-field": 1,
"guid-field": "6566f9b4-5245-40de-890d-98b40a4ad656",
"int16-field": 32000,
"int32-field": 2000000000,
"int64-field": 9223372036854775807,
"nullable-boolean-field": true,
"nullable-byte-field": 253,
"nullable-date-time-field": "1776-07-04T00:00:00",
"nullable-date-time-offset-field": "1776-07-04T00:00:00.0000000-05:00",
"nullable-decimal-field": "1056789.123",
"nullable-double-field": 1056789.123,
"nullable-enum-field": 2,
"nullable-guid-field": "3d1fb81e-43ee-4d04-af91-c8a326341293",
"nullable-int16-field": 32000,
"nullable-int32-field": 2000000000,
"nullable-int64-field": 9223372036854775807,
"nullable-sbyte-field": 123,
"nullable-single-field": 1056789.13,
"nullable-uint16-field": 64000,
"nullable-uint32-field": 3000000000,
"nullable-uint64-field": 9223372036854775808,
"sbyte-field": 123,
"single-field": 1056789.13,
"string-field": "Some string 156",
"uint16-field": 64000,
"uint32-field": 3000000000,
"uint64-field": 9223372036854775808
}
}
]
"date-time-field": "1776-07-04T00:00:00",
"date-time-offset-field": "1776-07-04T00:00:00.0000000-05:00",
"decimal-field": "1056789.123",
"double-field": 1056789.123,
"enum-field": 1,
"guid-field": "6566f9b4-5245-40de-890d-98b40a4ad656",
"int16-field": 32000,
"int32-field": 2000000000,
"int64-field": 9223372036854775807,
"j-token-array-field": [
{
"my-field1": "George Washington",
"overridden-field2": null,
"MyField3": 216
},
{
"my-field1": "Thomas Jefferson",
"overridden-field2": false,
"MyField3": 631
}
],
"j-token-object-field": {
"my-field1": "Abraham Lincoln",
"overridden-field2": true,
"MyField3": 439
},
"j-token-string-field": "Andrew Jackson",
"nullable-boolean-field": true,
"nullable-byte-field": 253,
"nullable-date-time-field": "1776-07-04T00:00:00",
"nullable-date-time-offset-field": "1776-07-04T00:00:00.0000000-05:00",
"nullable-decimal-field": "1056789.123",
"nullable-double-field": 1056789.123,
"nullable-enum-field": 2,
"nullable-guid-field": "3d1fb81e-43ee-4d04-af91-c8a326341293",
"nullable-int16-field": 32000,
"nullable-int32-field": 2000000000,
"nullable-int64-field": 9223372036854775807,
"nullable-sbyte-field": 123,
"nullable-single-field": 1056789.13,
"nullable-uint16-field": 64000,
"nullable-uint32-field": 3000000000,
"nullable-uint64-field": 9223372036854775808,
"sbyte-field": 123,
"single-field": 1056789.13,
"string-field": "Some string 156",
"uint16-field": 64000,
"uint32-field": 3000000000,
"uint64-field": 9223372036854775808
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
{
"data": [
{
"type": "posts",
"id": "201",
"attributes": {
"content": "Post 1 content",
"created": "2015-01-31T14:00:00.0000000+00:00",
"title": "Post 1"
},
"relationships": {
"author": {
"links": {
"self": "https://www.example.com/posts/201/relationships/author",
"related": "https://www.example.com/posts/201/author"
}
},
"comments": {
"links": {
"self": "https://www.example.com/posts/201/relationships/comments",
"related": "https://www.example.com/posts/201/comments"
}
},
"tags": {
"links": {
"self": "https://www.example.com/posts/201/relationships/tags",
"related": "https://www.example.com/posts/201/tags"
},
"data": [
{
"type": "tags",
"id": "301"
},
{
"type": "tags",
"id": "302"
}
]
}
}
},
{
"type": "posts",
"id": "202",
"attributes": {
"content": "Post 2 content",
"created": "2015-02-05T08:10:00.0000000+00:00",
"title": "Post 2"
},
"relationships": {
"author": {
"links": {
"self": "https://www.example.com/posts/202/relationships/author",
"related": "https://www.example.com/posts/202/author"
}
},
"comments": {
"links": {
"self": "https://www.example.com/posts/202/relationships/comments",
"related": "https://www.example.com/posts/202/comments"
}
},
"tags": {
"links": {
"self": "https://www.example.com/posts/202/relationships/tags",
"related": "https://www.example.com/posts/202/tags"
},
"data": [
{
"type": "tags",
"id": "302"
},
{
"type": "tags",
"id": "303"
}
]
}
}
},
{
"type": "posts",
"id": "203",
"attributes": {
"content": "Post 3 content",
"created": "2015-02-07T11:11:00.0000000+00:00",
"title": "Post 3"
},
"relationships": {
"author": {
"links": {
"self": "https://www.example.com/posts/203/relationships/author",
"related": "https://www.example.com/posts/203/author"
}
},
"comments": {
"links": {
"self": "https://www.example.com/posts/203/relationships/comments",
"related": "https://www.example.com/posts/203/comments"
}
},
"tags": {
"links": {
"self": "https://www.example.com/posts/203/relationships/tags",
"related": "https://www.example.com/posts/203/tags"
},
"data": [
{
"type": "tags",
"id": "303"
}
]
}
}
}
],
"included": [
{
"type": "tags",
"id": "301",
"attributes": {
"name": "Tag A"
},
"relationships": {
"posts": {
"links": {
"self": "https://www.example.com/tags/301/relationships/posts",
"related": "https://www.example.com/tags/301/posts"
}
}
}
},
{
"type": "tags",
"id": "302",
"attributes": {
"name": "Tag B"
},
"relationships": {
"posts": {
"links": {
"self": "https://www.example.com/tags/302/relationships/posts",
"related": "https://www.example.com/tags/302/posts"
}
}
}
},
{
"type": "tags",
"id": "303",
"attributes": {
"name": "Tag C"
},
"relationships": {
"posts": {
"links": {
"self": "https://www.example.com/tags/303/relationships/posts",
"related": "https://www.example.com/tags/303/posts"
}
}
}
}
]
}
Loading