Problem Statement
Why is dependency-injection considered a test-friendly design choice in Swift development?
Explanation
Using dependency injection lets you replace actual dependencies (e.g., network API, database) with mock or stub versions during testing, ensuring units can be tested in isolation and making debugging and maintenance easier.
Practice Sets
This question appears in the following practice sets: