Skip to content

Instantly share code, notes, and snippets.

@joebuschmann
Created October 17, 2014 13:37
Show Gist options
  • Select an option

  • Save joebuschmann/4883317c7d53cc0e80f8 to your computer and use it in GitHub Desktop.

Select an option

Save joebuschmann/4883317c7d53cc0e80f8 to your computer and use it in GitHub Desktop.
Step binding with optional preceding pronoun
[When(@"(?:I\s)?remove the (\d+)(?:st|nd|rd|th) item")]
public void WhenIRemoveTheItem(int index)
{
_products.RemoveAt(--index);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment