Skip to content

Commit

Permalink
when key-as-segment is used, 404 is returnd for Friends/MiddleName
Browse files Browse the repository at this point in the history
  • Loading branch information
mirsking committed Sep 1, 2016
1 parent 4090457 commit 929ccf7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public class TrippinInMemoryE2ETest : TrippinInMemoryE2ETestBase
// TODO since webapi doesnot handle query with null, the trips here in the datasource are actually not null.
[InlineData("/People('clydeguess')/Trips", 200)]
// collection of navigation property's property and navigation property has null value
// TODO should be bad request 400 as this is not allowed, 404 is returned by WebApi Route Match method. 500 is returned actually.
[InlineData("/People('willieashmore')/Friends/MiddleName", 500)]
// TODO should be bad request 400 as this is not allowed, 404 is returned by WebApi Route Match method. (404 is returned when key-as-segment, otherwise, 500 will be returned.)
[InlineData("/People('willieashmore')/Friends/MiddleName", 404)]
public void QueryPropertyWithNullValueStatusCode(string url, int expectedCode)
{
TestGetStatusCodeIs(url, expectedCode);
Expand Down Expand Up @@ -81,8 +81,8 @@ public void QueryPropertyWithNullValueStatusCode(string url, int expectedCode)
// collection of navigation property
[InlineData("/People('NoneExist')/Friends", 404)]
// collection of navigation property's property
// TODO should be bad request 400 as this is not allowed, 404 is returned by WebApi Route Match method. 500 is returned actually.
[InlineData("/People('NoneExist')/Friends/MiddleName", 500)]
// TODO should be bad request 400 as this is not allowed, 404 is returned by WebApi Route Match method. (404 is returned when key-as-segment, otherwise, 500 will be returned.)
[InlineData("/People('NoneExist')/Friends/MiddleName", 404)]
public void QueryPropertyWithNonExistEntity(string url, int expectedCode)
{
TestGetStatusCodeIs(url, expectedCode);
Expand Down

0 comments on commit 929ccf7

Please sign in to comment.