From 929ccf762120065b7a5139d543392ff350bf8fd7 Mon Sep 17 00:00:00 2001 From: mirsking Date: Thu, 1 Sep 2016 17:17:31 +0800 Subject: [PATCH] when key-as-segment is used, 404 is returnd for Friends/MiddleName --- .../TrippinInMemoryE2ETest.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TrippinInMemoryE2ETest.cs b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TrippinInMemoryE2ETest.cs index fbf5449f..ddc1b1f1 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TrippinInMemoryE2ETest.cs +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/TrippinInMemoryE2ETest.cs @@ -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); @@ -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);