Chapter 8. Discover and Explore

In this part we have seen how a traffic light system evolves. We worked from the outside into our application. One of the main differences from the first part is that we used the glue code to motivate the design for our domain classes. Another thing that enabled us to work in this way is that the designer of the system is the same person—or better, pair—as the one writing the glue code.

In fact, while implementing the glue code for the test automation, we noticed possible designs for the production class. In the first case we decided to implement a state pattern once we could see how the glue code differentiates the light states. In the second case we could extract the light switching controller directly from the ...

Get ATDD by Example: A Practical Guide to Acceptance Test-Driven Development 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.