How to component test Web API
I’ve been banging my head against the wall trying to figure out how to component test my Web API. Once upon time this used to be a fairly simple process using TestServer
and having a testable Startup
class but this seems to have changed.
Create expected result for the controller that will return BadRequestResult upon when exception occures in controller
here is the code for my test