Should you unit-test API/MVC controllers in ASP.NET Core?

added by DotNetKicks
8/25/2020 10:39:39 AM

529 Views

Based on Betteridge's law of headlines: no! But based on recent twitter activity, that's no doubt a somewhat controversial opinion, so in this post I look at what a unit-test for an API controller might look like, what a unit-test is trying to achieve, and why I think integration tests in ASP.NET Core give you far more bang-for-your-buck.


0 comments