Skip to content

Instantly share code, notes, and snippets.

@GraemeF
Created March 19, 2011 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GraemeF/b759fa100814bd04eb11 to your computer and use it in GitHub Desktop.
Save GraemeF/b759fa100814bd04eb11 to your computer and use it in GitHub Desktop.
_story.WithScenario("Run a query against the estate")
.Given(TheEstate, estate)
.And(IAmQueryingTheUseOf_Throughout_, application, A.TimePeriod.Build())
.When(IRunTheQueryOnTheEstate)
.Then(TheResultsIncludeAnExecutionEnvironmentOf_On_, user, device)
.Execute();
Where estate, application, user and device are all NSubstitute substitutes, produces this:
With scenario Run a query against the estate
Given the estate(Castle.Proxies.IEstateProxy) => Passed
And I am querying the use of Castle.Proxies.IApplicationProxy throughout 16/03/2011 09:00:00 to 16/03/2011 17:30:00 => Passed
When I run the query on the estate => Pending !!
Then the results include an execution environment of Castle.Proxies.IUserProxy on Castle.Proxies.IDeviceProxy => Pending !!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment