Summary

In this chapter, you acquired profound knowledge of the mechanics and capabilities of JUnit rules. You saw what it takes to write your own extension and learned how to evolve self-made rules by means of annotations. After that, you were imparted the usage of class rules on test suites and discussed the pros and cons of this approach. Besides, you were shown how rules can be nested in case your tests depend on a well-defined execution order. To round out the topic, we introduce third-party vendor solutions for common testing-related tasks.

The next chapter is devoted to the various available verification concepts. It will put the built-in assert functionality on a test and explain the assets and drawbacks of the most popular alternatives. ...

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