Sketching Out the Domain Model

The heart of any object-oriented program is the domain model. When we start to build a new system, we like to work directly with the domain model. This allows us to iterate and learn quickly about the problem we’re working on without getting distracted by user interface gizmos. Once we have a domain model that really reflects our understanding of the system, it’s easy to wrap it in a pretty skin.

We’re going to let Cucumber drive our work, building the domain model classes directly in the step definitions. As usual, we start by running cucumber on our scenario to remind us what to do next:

Feature: Cash Withdrawal
Scenario: Successful withdrawal from an account in credit
Given I have deposited $100 in ...

Get The Cucumber Book now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.