In this episode, we start test-driving a concrete implementation of the
As we dive into the first tests, we decide it’s important to isolate the factory tests as much as we can in order to avoid fragile tests that rely too much on poking the UI.
To do so, we showcase two approaches and discuss their drawbacks. One is to make the view controller’s properties getters internal, enabling the test target to assert its values in a unit test style, and the other is to have integration tests that combine multiple layers in its setup.
Finally, we decide to go with unit tests and internal getters, as it’s simpler and much easier to manage when dealing with multiple deployment targets.