SOLID (Do you remember what that stands for?) and Unit Testing
- At unit tests, each one of them targets a single behavior in SUT. These behaviors combined lead to an SRP.
- Unit tests help to protect classes from changes that can break them from working, as tests should keep passing, so, OCP works hand in hand with unit tests to protect code.
- There is no direct effect on LSP from unit tests. Similar case with ISP.
- Shouldn’t interfaces a class depends on be slim so we can add them as required? No direct relation between unit tests and ISP.
- DIP, in this case, there is a tight relationship with unit tests as this allows us to implement unit tests so we can mock the SUT as both tests and classes depend on interfaces we can inject.