Chapter 3. Developing Independently Testable Units

One of the most difficult parts for JUnit beginners confronted with non-trivial real-world situations is to decompose big requirements into small and independently testable units. At the beginning of this chapter, you're going to learn how requirements can be translated into single responsibility components and how they assemble into a collaborating system.

Next you're going to understand the impact of collaboration dependencies on our testing efforts. Once you're aware of the role of collaborators and how a component under test interacts with them, you'll get to know when it is important to replace them with test doubles.

Continuing our timeline example, we'll look at the use cases and application ...

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.