3 ms·
Of the countless pro's for Dependency Injection, it allows for near perfect test isolation, among many other benefits. Test the code under test, mock the rest.
by exabrial 1y ago
Of the countless pro's for Dependency Injection, it allows for near perfect test isolation, among many other benefits. Test the code under test, mock the rest. Not not mention limitless composition instead of inheritance.
The real con of Dependency Injection = {Developer Egos + ( Boredom | Lax Deadlines ) Lack of senior oversight} which inevitably yields needless overengineering.