Review and next steps
When we have completed writing our tests, as briefly outlined in this chapter, we will have created a great trap for future bugs. Each time we run our tests, any changes to the expected behavior will stand out as failures for us to correct. This ensures that as we continue refactoring, we will be doing more good than harm to our legacy codebase as a whole.
In addition, because we now have a working test suite, we can add tests for any new behavior extracted from our legacy codebase into our application classes. Each time we create a new application class method, we will also create a passing test for that method. Each time we modify an application class method, we will run the test suite so that we can find bugs and breaks ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access