Chapter 9. Solving Test Puzzles

"We make a living by what we get, but we make a life by what we give."

—Winston Churchill

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.

Tip

A greenfield project starts building from scratch and doesn't consider any prior work.

A brownfield project is an extension of prior work or rebuilding a project from an existing project.

This chapter covers the importance of unit testing in greenfield and brownfield projects. The ...

Get Mastering Unit Testing Using Mockito and JUnit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.