-
-
Save anvaka/4108943 to your computer and use it in GitHub Desktop.
BDD syntax example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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