Created
February 20, 2017 09:56
-
-
Save gasparnagy/e965c3b862494f82a89565aae8cc5730 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Scenario: Parameterless steps | |
Given a scenario 'Simple Scenario' as | |
""" | |
When I do something | |
""" | |
And the following step definitions | |
""" | |
[When] | |
public void When_I_do_something() | |
{} | |
""" | |
When I execute the tests | |
Then the binding method 'When_I_do_something' is executed | |
Scenario Outline: Steps with parameters | |
Given a scenario 'Simple Scenario' as | |
""" | |
When <parameter> does something | |
""" | |
And the following step definitions | |
""" | |
[When] | |
public void When_WHO_does_something(string who) | |
{ | |
if (who != "Joe") throw new Exception("invalid parameter: " + who); | |
} | |
""" | |
When I execute the tests | |
Then the binding method 'When_WHO_does_something' is executed | |
And the scenario should pass | |
Examples: | |
| case | parameter | | |
| simple | Joe | | |
| quoted | "Joe" | | |
| apostrophed | 'Joe' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment