The BDD story of the Village Idiot - a weekend distraction.
Fiddling with NBehave, I couldn’t help myself. It’s probably only me who’s laughing though. For those Woody Allen fans who remember the film “Love and Death” and the characters of Old and Young Nehamkin.
[Story()] [Test()] public void FirstDumbStory() { Story dumbstory = new Story(“The Dumbest story ever”); dumbstory.AsA(“Village Idiot”).IWant(“Fields of Wheat”). SoThat(“I can frolic”); dumbstory.WithScenario(“I frolic”) .Given(“Nice weather”, “I can go out”, s => { ; }) .When(“I am fully fit”, “my spirits will be up”, s => { ; }) .Then(“I have outdoor options”, “and I shall play amongst wheat”, s => { ; }); }
produces the following:
Story: The Dumbest story ever
Narrative:
As a Village Idiot
I want Fields of Wheat
So that I can frolic
Scenario 1: I frolic
Given Nice weather: I can go out
When I am fully fit: my spirits will be up
Then I have outdoor options: and I shall play amongst wheat
1 passed, 0 failed, 0 skipped, took 4.52 seconds.
1 comment








