title: How do I unit test model validation in controllers decorated with [ApiController]?
body: <p>As pointed out in <a href="https://stackoverflow.com/a/51545439/1621861">this anwer</a> to <a href="https://stackoverflow.com/questions/51543863/asp-net-core-2-1-apicontroller-does-not-automatically-validate-model-under-unit">Asp.Net Core 2.1 ApiController does not automatically validate model under unit test</a>, the automatic ModelState validation that ASP.NET Core 2.1's ApiControllerAttribute gives us only works when actualyy requestion the action at runtime, not by calling it with an invalid parameter in a unit test. </p>
  
  <p>However, I still want to test if my action actually returns a BadRequestResult when supplying an incorrect model. Is there any way of doing this? I get that I can still manually check if ModelState.IsValid is false, and returning BadRequest() myself, but that kind of defeats the point of the automatic validation.</p>
  
  <p>Am I stuck manually checking ModelState.IsValid after all, or is there a way to make use of the new ApiControllerAttribute model validation in a unit test?</p>