TDD and Dependency Injection
How Two simple techniques can make a big difference in your coding life
TLDR;
Test Driven Development (TDD) and Dependency Injection, or the Dependency Inversion Principle, go hand in hand. They seem to complement themselves. Getting proficient in their use is not hard: you just have to see an example and apply it. These techniques will make your code more modular and easier to test. On top of that, your dependencies will be visible, design smells will be clearer and your test pyramid will be an actual pyramid. In this article, we will see a simple example you can build upon in your daily work.