Skip to content

Instantly share code, notes, and snippets.

@darrencauthon
Created May 19, 2015 20:26
Show Gist options
  • Save darrencauthon/c6dab6fb30f3e2b9614f to your computer and use it in GitHub Desktop.
Save darrencauthon/c6dab6fb30f3e2b9614f to your computer and use it in GitHub Desktop.
Save the table for later
Background:
Given I have a table named Test
| Field | Value |
| x | y |
Scenario:
When I look at the Test Table
[Given("I have a table named (.*)")]
public void a(string tableName, Table table)
{
ScenarioContext.Current.Set<Table>(table, tableName);
}
[When("I look at the (.*) Table")]
public void b(string tableName)
{
var table = ScenarioContext.Current.Get<Table>(tableName);
// do something?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment