News for hackers. Stuff that matters.
Re:Minimal APIs at a glance in .NET 6 by stonemetal12 on Monday September 13, 2021 @11:06AM (#28512418)
Unit tests are valuable if you are doing some sort of "computation". If all code in question is doing is plugging x into y, then unit tests are useless and integration tests are where the payoff is.

If you have code that does both plug and compute you should refactor them so that computing and plugging don't happen in the same place. Doing so will reduce instances of hard to test code.

In general controllers are plugging code not computing code, so integration tests tend to be the more appropriate choice.

There are no comments on this comment yet.