You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 19, 2024. It is now read-only.
[RoutePrefix("api/v1/{id}")]
public class SomeController : ApiController
{
[Route("values")]
public someValues Get(int id) { }
}
_config.ShouldMap("/api/v1/1/values").To(HttpMethod.Get, x => x.Get(1));
and I have exception MvcRouteTester.Assertions.AssertionExceptionExpected '1', got missing value for 'id' at url '/api/v1/1/values' . After some debugging I found that expected and actual route values different only by one property! This property was RouteValueOrigin. For actual values it's equal to RouteValueOrigin.Params BUT for expected value it was RouteValueOrigin.Unknown from that strange line
var routeValueOrigin = isFromBody ? RouteValueOrigin.Body : RouteValueOrigin.Unknown;
Hi. I have a very simple routing for Web Api
and I have exception
MvcRouteTester.Assertions.AssertionExceptionExpected '1', got missing value for 'id' at url '/api/v1/1/values'. After some debugging I found that expected and actual route values different only by one property! This property was RouteValueOrigin. For actual values it's equal to RouteValueOrigin.Params BUT for expected value it was RouteValueOrigin.Unknown from that strange line