Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* engine is able to respond with empty resource collection * unit test for resource list
- Loading branch information
Showing
8 changed files
with
279 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...s/HalResourceMixedContentTest.peopledetail_empty_resource_list_get_json_test.approved.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"Id": 1, | ||
"Name": "Org Name", | ||
"_links": { | ||
"self": { | ||
"href": "/api/organisations/1" | ||
}, | ||
"people": { | ||
"href": "/api/organisations/1/people" | ||
}, | ||
"boss": { | ||
"href": "/api/organisations/1/boss" | ||
} | ||
}, | ||
"_embedded": { | ||
"person": [], | ||
"boss": { | ||
"HasPointyHair": true, | ||
"Id": 2, | ||
"Name": "Eunice PHB", | ||
"OrganisationId": 1, | ||
"_links": { | ||
"self": { | ||
"href": "/api/organisations/1/boss" | ||
} | ||
} | ||
} | ||
} | ||
} |
71 changes: 71 additions & 0 deletions
71
...lResourceMixedContentTest.peopledetail_non_empty_resource_list_get_json_test.approved.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"Id": 1, | ||
"Name": "Org Name", | ||
"_links": { | ||
"self": { | ||
"href": "/api/organisations/1" | ||
}, | ||
"people": { | ||
"href": "/api/organisations/1/people" | ||
}, | ||
"person": [ | ||
{ | ||
"href": "/api/organisations/1/people/3" | ||
}, | ||
{ | ||
"href": "/api/organisations/1/people/4" | ||
}, | ||
{ | ||
"href": "/api/organisations/1/people/5" | ||
} | ||
], | ||
"boss": { | ||
"href": "/api/organisations/1/boss" | ||
} | ||
}, | ||
"_embedded": { | ||
"person": [ | ||
{ | ||
"Id": 3, | ||
"Name": "Dilbert", | ||
"OrganisationId": 1, | ||
"_links": { | ||
"self": { | ||
"href": "/api/organisations/1/people/3" | ||
} | ||
} | ||
}, | ||
{ | ||
"Id": 4, | ||
"Name": "Wally", | ||
"OrganisationId": 1, | ||
"_links": { | ||
"self": { | ||
"href": "/api/organisations/1/people/4" | ||
} | ||
} | ||
}, | ||
{ | ||
"Id": 5, | ||
"Name": "Alice", | ||
"OrganisationId": 1, | ||
"_links": { | ||
"self": { | ||
"href": "/api/organisations/1/people/5" | ||
} | ||
} | ||
} | ||
], | ||
"boss": { | ||
"HasPointyHair": true, | ||
"Id": 2, | ||
"Name": "Eunice PHB", | ||
"OrganisationId": 1, | ||
"_links": { | ||
"self": { | ||
"href": "/api/organisations/1/boss" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Collections; | ||
|
||
namespace WebApi.Hal | ||
{ | ||
public interface IResourceList : IEnumerable | ||
{ | ||
string RelationName { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.