What We Just Learned

It might seem like the system we’ve been building here is just a toy. There aren’t any concrete components that a user could interact with yet: our CashSlot is just a plain old Java class, and there aren’t any buttons for the user to push. What we do have, though, are the beginnings of a domain model and a greater understanding of the problem. Outside-in doesn’t always mean starting with the user interface; it means starting with the outside of whatever you want to discover.

We know it isn’t always possible to work like this. You’ll often be adding tests to a legacy system or working on a project where the user interface is already well defined by the time you’re asked to develop the code. Even in these situations, modeling ...

Get The Cucumber for Java Book 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.