"We make a living by what we get, but we make a life by what we give."
You may have worked in greenfield development projects that were written using test-driven development (TDD) and also in brownfield development or maintenance projects that were not written with TDD. You must have noticed that the test-first code written with TDD is easier to extend than the code with no unit test or unit tests written after coding.
This chapter covers the importance of unit testing in greenfield and brownfield projects. The following topics are covered in depth:
Working with legacy code
Designing for testability
Working with greenfield code
The Working with legacy code section covers the legacy code and explains how to unit test and refactor the legacy code. The Designing...