The TDD or test-first implementation

At this time, we know how TDD works—writing tests before, implementation after tests, and refactoring later on. We are going to pass through the process and only show the final result for each requirement. It is left to you to figure out the iterative Red-Green-Refactor process. Let's make this more interesting, if possible, by using a Hamcrest framework in our tests.

Get Test-Driven Java Development - Second Edition 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.