-
Notifications
You must be signed in to change notification settings - Fork 6
Tables
msuarz edited this page Nov 2, 2010
·
10 revisions
Mostly used in Setup and Verify steps. The default behavior results in bi-dimensional array passed into the step. The types are inferred.
Scenario: Dead cell with 0 neighbors stays dead Given the following setup | . | . | . | | . | . | . | | . | . | . | When I evolve the board Then the center cell should be "dead"
[TestMethod]
public void DeadCellWith0NeighborsStaysDead()
{
Given_the_following_setup
(
new[] {".", ".", "."},
new[] {".", ".", "."},
new[] {".", ".", "."}
);
When_I_evolve_the_board();
Then_the_center_cell_should_be("dead");
}
public void Given_the_following_setup(params string[][] Cells)
{
...
}
Use [ and ] on the first row to make it a header. Instead of an array
Scenario: Sum A plus B = C [A |B |C ] |0 |0 |0 | |0 |1 |1 | |21|21|42|