O'Reilly logo

ATDD by Example: A Practical Guide to Acceptance Test-Driven Development by Markus Gärtner

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

Chapter 7. First Crossing

In this chapter we want to deal with the first thing for a traffic lights control system. Assume we have two crossing roads, and the most basic thing for our system will be to control the traffic lights for each direction. There is one thing the law asks us to consider for this system: Two crossing directions are never under any circumstance allowed to show green at the same time. We will keep this in mind while coming up with examples for our controller.

Controller Specifications

Let’s take a look at the specifications for the controller. We have two directions. The controller controls state transitions, probably by transitioning to the next state when some timer expires. The controller will change just one light at ...

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