Closed RKivioja closed 1 year ago
IMHO interfaces should only be added if they actually serve a purpose. If a single class implements a single interface and we're never mocking the interface, then there's no added benefit, on the contrary, you've added additional code and slightly more complexity. Also YAGNI.
But I think it's okay here, was more of a general recommendation, not everything needs an interface. 😄
@eXpl0it3r
Yes. That is one reason, but it is also generally just a good idea to inject interfaces instead of class implementations. I didn't see any reason why these classes should be missing interfaces. SimpleInjector is also tremendously easier to use this way.