We begin the third tomato by sanitizing our
FlowTest class. We refactor the tests by removing duplicated code, we talk about different ways for organizing the test setup code and we showcase the factory method for the creation of the system under test. These changes will prove very valuable as the project grows.
Flow class, we decided to solve the problem of progressing from one question to the next by using recursion.
Finally, we discussed the access control of the Flow
class and we realized that only the
start() method needs to be visible to the outside world, meaning the behavior of this class is being tested through this single interface!