Created
February 20, 2017 06:56
-
-
Save gasparnagy/d4ecf471f56241a855faa5c6d25dc7f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Binding] | |
public class CalculatorSteps | |
{ | |
private readonly Calculator calculator = new Calculator(); | |
[Given(@"I have entered (.*) into the calculator")] | |
public void GivenIHaveEnteredIntoTheCalculator(int operand) | |
{ | |
calculator.Enter(operand); | |
} | |
[When(@"I press add")] | |
public void WhenIPressAdd() | |
{ | |
calculator.Add(); | |
} | |
//... | |
[Then(@"the result should be (.*) on the screen")] | |
public void ThenTheResultShouldBeOnTheScreen(int expectedResult) | |
{ | |
Assert.Equal(expectedResult, calculator.Result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment