O'Reilly logo

JUnit Recipes: Practical Methods for Programmer Testing by J B Rainsberger, Scott Stirling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required