3 ms·
> or if class instances were always invoked directly without magic. Then you can't provide a test seam. Dependency injection + mocking is a very powerful conc
by okeuro49 3y ago
> or if class instances were always invoked directly without magic.
Then you can't provide a test seam.
Dependency injection + mocking is a very powerful concept.
- BlargMcLarg 3y agoSure you can. Class constructors are still a thing.
- bhdlr 3y ago> Sure you can. Class constructors are still a thing. Definitely. I do 99% of my dependency injection as constructor "injection". Injection frameworks and Whitebox testing just introduce layers of complexity that can be very difficult to debug
- bhdlr 3y ago> Sure you can. Class constructors are still a thing. Definitely. I do 99% of my dependency injection as constructor "injection". Injection frameworks and Whitebox testing just introduce layers of complexity that can be very difficult to debug