web-api-contrib

Testing ASP.NET Web API POST and Parameterless GET Routes with WebApiContrib.Testing

醉酒当歌 提交于 2019-12-12 04:05:37
问题 I am trying to set up some route tests using the WebApiContrib.Testing library. My get tests (like this) work fine... [Test] [Category("Auth Api Tests")] public void TheAuthControllerAcceptsASingleItemGetRouteWithAHashString() { "~/auth/sjkfhiuehfkshjksdfh".ShouldMapTo<AuthController>(c => c.Get("sjkfhiuehfkshjksdfh")); } I am rather lost on the post test - I currently have the following which fails with a NotImplementedException... [Test] [Category("Auth Api Tests")] public void