Part 1. The building blocks

So you want to write tests with JUnit. Where do you begin?

This part of the book lays the groundwork for effectively using JUnit to design and test Java code. Once you understand and can apply these recipes to your work, you will have the foundation you need to write JUnit tests for any behavior you will ever need to implement—all such tests reduce to one or more of the recipes in the next several chapters. The challenge is to recognize these smaller, simpler patterns within the larger code and class structures you find in a typical, industrial-grade Java application. Before we tackle those larger problems, we first handle some smaller ones.

By the end of part 1 you will have seen over 60 essential JUnit techniques ...

Get JUnit Recipes 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.