After

In this chapter you learned about what sorts of tests you’ll want to write. Using the Right-BICEP mnemonic, you’ll remember to write tests that cover happy paths, boundary conditions, and error conditions. You’ll also remember to bolster the validity of your testing by cross-checking results and looking at inverse relationships. You also know when it might be useful to look at the performance of your code.

Next up, you’ll dig deeper into the CORRECT mnemonic that we touched on in this chapter. You’ll pick up a few additional ideas on how to cover the many boundary cases that crop up in the code you write.

Get Pragmatic Unit Testing in Java 8 with 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.