Skip to content

Instantly share code, notes, and snippets.

@gasparnagy
Created February 20, 2017 06:58
Show Gist options
  • Save gasparnagy/c3de41a4b60a89eb443d612d0af4e1ec to your computer and use it in GitHub Desktop.
Save gasparnagy/c3de41a4b60a89eb443d612d0af4e1ec to your computer and use it in GitHub Desktop.
[Binding]
public class CalculatorSteps
{
private readonly ScenarioContext scenarioContext;
public CalculatorSteps(ScenarioContext scenarioContext)
{
this.scenarioContext = scenarioContext;
}
[Given(@"I have entered (.*) into the calculator")]
public void GivenIHaveEnteredIntoTheCalculator(int operand)
{
((Calculator)scenarioContext["calc"]).Enter(operand);
}
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment