Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

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

Select an option

Save joebuschmann/abf036e9fcf4c3e73c3e5ca09c8d6b27 to your computer and use it in GitHub Desktop.
[StepArgumentTransformation(@"(\d+)(?:st|nd|rd|th)")]
public int GetIndex(int index)
{
return index - 1;
}
[When(@"I remove the (.*) product")]
public void RemoveProduct(int index)
{
_products.RemoveAt(index);
}
[When(@"I update the (.*) product to (.*)")]
public void UpdateProduct(int index, string productName)
{
_products[index] = productName;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment