Skip to content

Instantly share code, notes, and snippets.

@yreynhout
Last active December 21, 2015 04:48
Show Gist options
  • Save yreynhout/6251704 to your computer and use it in GitHub Desktop.
Save yreynhout/6251704 to your computer and use it in GitHub Desktop.
public class TravisSpecs {
[Test]
public void WhenTravisGetsIntoAnotherFight() {
new ScenarioBuilder().
Given(TheStoryOfWhatHappenedToTravis())
When(TravisGetsInToANewFight()).
Then(HeRuns()).
Assert();
}
Fact[] TheStoryOfWhatHappenedToTravis() {
return State.
That(TravisWasBorn()).
That(TravisHadAPleasantChildhood()).
That(TravisWentToSchoolEveryDay()).
That(TravisAteAllHisVegetables()).
That(TravisHadSexForTheFirstTimeAtTheAgeOf20()).
That(TravisHadRunSeveralMarathonsByTheAgeOf25()).
That(TravisWorkedInAFactoryForMostOfHisLife()).
That(TravisOneNightAfterOneTooManyBeers()).
That(HeGotIntoAFight()).
That(HeLost()).
That(TravisHadToGoSeeTheDentistAboutSomeMissingTeeth()).
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment