-
Notifications
You must be signed in to change notification settings - Fork 0
/
CompoundEscalation.cs
43 lines (36 loc) · 1.22 KB
/
CompoundEscalation.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using Xunit.Gherkin.Quick;
using Feature = Xunit.Gherkin.Quick.Feature;
namespace Xunit.Gherkin.PilotProject
{
[FeatureFile("CompoundEscalation.feature")]
public class CompoundEscalation : Feature
{
public Calculator compEsc = new Calculator();
[Given(@"I chose {} as first number")]
public void I_chose_first_number(double firstNumber)
{
compEsc.SetFirstNumber(firstNumber);
}
[And(@"I chose {} as escalation value")]
public void I_chose_interest_rate(double interestRate)
{
compEsc.SetInterestRate(interestRate);
}
[And(@"I chose {int} as the number of Escalation Years")]
public void I_chose_escalation_years(int escalationYears)
{
compEsc.SetEscalationYears(escalationYears);
}
[When(@"I press calculate")]
public void I_press_calc()
{
compEsc.calcCompoundEscalation();
}
[Then(@"the result should return {} on the screen")]
public void The_result_should_be_z_on_the_screen(double expectedResult)
{
var actualResult = compEsc.Result;
Assert.Equal(expectedResult, actualResult);
}
}
}