News for hackers. Stuff that matters.
Re:Understanding the .NET ecosystem: The evolution of .NET i... by diarrhea on Wednesday March 22, 2023 @03:08AM (#35257770)
Really liking your approaches and wish our code base followed them more as well.

Mocking leads to “interfaces everywhere”, I agree. The latter also results from the attitude of putting interfaces all over, even if there’s just a single concrete implementation that makes sense at any point in time, like a file hashing routine (which of course should just be a function but that’s not a thing in C#). Dependency inversion gone overboard?

My biggest qualm with mocking is setting up a detailed test, where every method called is specified, alongside their order etc. You’re reimplementing the entire method essentially. Those tests I despise.

There are no comments on this comment yet.