How do you test behavior that depends on indirect inputs in isolation?
By building a test-specific replacement for the dependency, which you can use to control the indirect inputs it provides to the system under test.
We’re in the middle of building the UI component of the new menu fetching from a remote API functionality. We started from the UI to have an Earliest Testable version of the dynamic update, but that means we don’t have the real networking component yet.
In the previous chapter, we applied the Dependency Injection Principle and defined an abstraction for the ...