Everyone should have a tool-building factory factory factoryi.ibb.coimage fuck_u_spez ( @fuck_u_spez@lemmy.fmhy.ml ) Programmer Humor@programming.dev • 1 year ago message-square42fedilinkarrow-up1310
arrow-up1310imageEveryone should have a tool-building factory factory factoryi.ibb.co fuck_u_spez ( @fuck_u_spez@lemmy.fmhy.ml ) Programmer Humor@programming.dev • 1 year ago message-square42fedilink
minus-square tatterdemalion ( @tatterdemalion@programming.dev ) linkfedilink2•1 year agoDo you write unit tests with objects mocked via interfaces? Or polymorphism via interfaces? Those are the main reasons to use DI.
minus-square fuck_u_spez ( @fuck_u_spez@lemmy.fmhy.ml ) OPlinkfedilink2•1 year agoI guess I have to start calling function invocation with generic parameters, fancy names (like “dependency injection” ^^)
minus-square tatterdemalion ( @tatterdemalion@programming.dev ) linkfedilink1•1 year agoYea that works too.
Do you write unit tests with objects mocked via interfaces? Or polymorphism via interfaces? Those are the main reasons to use DI.
I guess I have to start calling function invocation with generic parameters, fancy names (like “dependency injection” ^^)
Yea that works too.