The TDD Process
The first two chapters have introduced you to the TDD process by showing you the steps involved. You have seen build failures when declaring multiple tests. You have seen what can happen when we get ahead of ourselves and write code that isn’t needed yet. That was a small example with a test result, but it still showed how easy it is to sometimes let code slip into a project before there are tests to support the code. And you also saw how the code starts out with a simple or partial implementation, gets working first, and then is enhanced.
We will cover the following topics in this chapter:
- How build failures come first and should be seen as part of the process
- Why you should write only enough code to pass your tests
- How to enhance a test and get another pass
This chapter will begin by introducing you to the TDD process. For a more detailed walkthrough with more code, refer to Chapter 10, The TDD Process in Depth.
Now, it’s...