Chapter 7. Test-driving the unpredictable

Horses are predictably unpredictable.

Loretta Gage, the oldest student at Colorado State University’s College of Veterinary Medicine

So far, we’ve dealt with data-access code, web components, and regular business logic. The common denominator for what we’ve seen so far is that this type of code executes somewhat detached from the underlying platform and, most notably, executes in a predictable manner. Not all code is like that. In this chapter, we’ll drop the gloves and go knuckle-to-knuckle against specific domains of programming in Java, which involve unpredictable functionality and are typically somewhat more complex to work with in a test-first manner:

  • Time-dependent functionality
  • Multithreaded ...

Get Test Driven 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.