by liuliu · 5y ago · 0 comments
1. If you write a unit tests and really need to have a double of that particular component, then do it. Otherwise, don't.
2. You need to decouple the dependency (maybe these are circular), then do it. Otherwise, just take on it as a dependency.
A->B means a depends on B, A->I means A depends on an interface, and A.I=B means that B is set as the implementation of the I interface that A depends on.
I’m on mobile so that was the best I could come up with. Try it out using Swift though, and that can be translated pretty directly.