3 ms·
> got a lot of vocal pushback from the TDD community who see great value in adding dependency injection and an interface to every library call you make Hah, ad
by GordonS 7y ago
> got a lot of vocal pushback from the TDD community who see great value in adding dependency injection and an interface to every library call you make
Hah, adding a matching interface for every..single..class is something that drives me nuts! Many C# devs seem to have fallen into this trap, because "I need it for mocking". Sure, but do you actually need to mock out the dependency? IMO, overuse of mocks makes for brittle tests that are painful to maintain. I prefer only mocking "complex" dependencies.
In any case, hopefully C# 8's default interface methods will help alleviate this madness.