My last response for your question, you can ping me to discuss further.
- TDD is another topic don’t focus too much to my snippet code. I’m going to write another article about this in near future.
- The example is step by step to resolve DIP by applying IoC and DI
- Decoupling was solved by applying DI not in IoC.
- Inversion was done by using abstraction instead of concrete class.
- IoC doesn’t meaning that decoupling
P/s: I think that if you already have the answer for your question then you should share here and we could discuss on that.
Regards.