Skip to content

Instantly share code, notes, and snippets.

@anvaka
Forked from Restuta/gist:4108845
Created November 19, 2012 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anvaka/4108943 to your computer and use it in GitHub Desktop.
Save anvaka/4108943 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);
"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