Chapter 10. Interlude: Revisiting Intent

Chapter 2 discussed the topics of intentional programming and of understanding and testing the intent of code. Now that we have several chapters of testing techniques under our belts, let’s consider a more complex example.

Everywhere you look, you will find code that mixes intentions together. Most often it begins because the responsibilities have not matured enough to warrant separation. It continues when developers fail to recognize that the concerns are crystallizing. This is all about the Single Responsibility Principle, the first of Uncle Bob Martin’s SOLID principles.1

1. SOLID stands for Single responsibility, Open-closed, Liskov substitution, Interface segregation, and Dependency inversion. See ...

Get Quality Code: Software Testing Principles, Practices, and Patterns 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.