Modelling By Example

What ?

Ubiquitous Language

Behat

DDD

Embrace the language

Given

a product is available in the catalog

$this->catalog = new Catalog;
$this->product = new Product;
$this->catalog->add($this->product);

DEMO

Feature: make a planning
    In order to not forget tasks and ensure they won't overlap
    As a planner
    I can organize my tasks by time

    @ui
    Scenario: add a task to do at a given time
        Given an empty planning
        When I plan some task at 12
        Then it should be accepted

    Scenario: add a task to do at the same time as another task
        Given a task is already planned for 12
        When I plan some other task at the same time
        Then it should refused
        And I should be proposed an alternative

    Scenario: force 2 tasks to overlap
        Given a task is already planned for 12
        And I plan some other task at the same time
        When I force them to overlap
        Then I should see them both listed at the same time

    @ui
    Scenario: get an overview of my tasks
        Given a pretty busy week
        When I ask for a recap
        Then I should have a tabular visualization of my tasks
Made with Slides.com