Skip to content

Instantly share code, notes, and snippets.

@mnaoumov
Forked from anvaka/gist:4108943
Created November 19, 2012 04:26
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 mnaoumov/4108955 to your computer and use it in GitHub Desktop.
Save mnaoumov/4108955 to your computer and use it in GitHub Desktop.
BDD syntax example
[Feature]
public class Tool_usage
{
[Scenario]
public void Use_new_tool()
{
// Can you do this?
Tool tool = default(Tool);
BDD(
Given("I created a new tool", () =>
{
tool = new Tool();
}),
When("I use this tool", () =>
{
tool.Use();
}),
Then("It should look used", () =>
{
tool.Look.ShouldEqual("used");
})
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment