Created
April 10, 2016 15:31
-
-
Save AddressXception/c54b466eb4f92a09d0ecf6b588863ea4 to your computer and use it in GitHub Desktop.
This file contains 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 TipCalcScreenSteps : StepsBase | |
{ | |
private ITipCalcScreen _tipCalcScreen; | |
protected override void GetScreens() | |
{ | |
_tipCalcScreen = FeatureContext | |
.Current | |
.Get<ITipCalcScreen>(ScreenNames.TipCalc); | |
} | |
[Given(@"I have selected the SubTotal field")] | |
public void GivenIHaveSelectedTheSubTotalField() | |
{ | |
App.Tap(_tipCalcScreen.SubTotalEntry); | |
} | |
[When(@"I enter (.*) into the SubTotal field")] | |
public void WhenIEnterIntoTheSubTotalField(int p0) | |
{ | |
App.EnterText(_tipCalcScreen.SubTotalEntry, p0.ToString()); | |
} | |
[Then(@"the Tip Amount should be (.*) on the screen")] | |
public void ThenTheTipAmountShouldBeOnTheScreen(int p0) | |
{ | |
var result = App.Query(_tipCalcScreen.TipAmount)[0].Text; | |
Assert.IsTrue(p0.ToString() == result, | |
$"the result {result} does not match the test value {p0}"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment