I would like the unit test to perform some actions on the controller and ultimately verify that the validation attributes and response filters work properly. It was easy to do this in ASP.NET MVC using mvccontrib; however, using the Web API, the mockery of the HttpContext seems completely different.
How can I trick the HttpContext for the web API controller so that I can check the model binding, etc.?
source
share