O'Reilly logo

Quality Code: Software Testing Principles, Practices, and Patterns by Stephen Vance

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

Discerning Intent

We did a couple of things in this chapter. The obvious one is that we took a common—although sometimes controversial—design pattern and broke down how to test it while preserving the essence of its intent. More importantly, though, we recognized that some of the patterns we have been taught to use without question require closer inspection to test. To take this a step further, using accepted design patterns idiomatically—as a chunk6 or out of habit—at a minimum complicates your testing—perhaps unnecessarily—and can unintentionally entangle concerns.

6. “Chunking” is a concept in the study of second-language acquisition. Effective language learners acquire “chunks,” or sequences of words, as a unit rather than limiting their ...

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