Class CalculatorSteps
java.lang.Object
calculator.CalculatorSteps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidgivenTheFollowingListOfNumbers(List<List<String>> numbers) voidgivenTheSum(int n1, int n2) voidvoidthenItsNotationIs(String notation, String s) voidthenTheOperationEvaluatesTo(int val) voidthenTheOperationEvaluatesToComplex(double real, double imaginary) voidthenTheOperationEvaluatesToRational(int numerator, int denominator) voidthenTheOperationEvaluatesToReal(double real) voidthenTheOperationIs(String s, int val) voidvoidvoidwhenIProvideAComplexNumber(double real, double imaginary) voidwhenIProvideANumber(String s, int val) voidwhenIProvideARationalNumber(int numerator, int denominator) voidwhenIProvideARealNumber(double real)
-
Constructor Details
-
CalculatorSteps
public CalculatorSteps()
-
-
Method Details
-
resetMemoryBeforeEachScenario
public void resetMemoryBeforeEachScenario() -
givenIInitialiseACalculator
@Given("I initialise a calculator") public void givenIInitialiseACalculator() -
givenAnIntegerOperation
-
givenTheFollowingListOfNumbers
-
givenTheSum
@Given("^the sum of two numbers (\\d+) and (\\d+)$") public void givenTheSum(int n1, int n2) -
thenItsNotationIs
-
whenIProvideANumber
-
whenIProvideAComplexNumber
@When("I provide a complex number {double} and {double}i") public void whenIProvideAComplexNumber(double real, double imaginary) -
whenIProvideARealNumber
@When("I provide a real number {double}") public void whenIProvideARealNumber(double real) -
thenTheOperationIs
-
thenTheOperationEvaluatesTo
@Then("the operation evaluates to {int}") public void thenTheOperationEvaluatesTo(int val) -
thenTheOperationEvaluatesToComplex
@Then("the operation evaluates to the complex number {double} and {double}i") public void thenTheOperationEvaluatesToComplex(double real, double imaginary) -
thenTheOperationThrowsAnArithmeticException
@Then("the operation throws an ArithmeticException") public void thenTheOperationThrowsAnArithmeticException() -
whenIProvideARationalNumber
@When("I provide a rational number {int} \\/ {int}") public void whenIProvideARationalNumber(int numerator, int denominator) -
thenTheOperationEvaluatesToRational
@Then("the operation evaluates to the rational number {int} \\/ {int}") public void thenTheOperationEvaluatesToRational(int numerator, int denominator) -
thenTheOperationEvaluatesToReal
@Then("the operation evaluates to the real number {double}") public void thenTheOperationEvaluatesToReal(double real) -
thenTheOperationIsNotPossible
@Then("the operation is not possible") public void thenTheOperationIsNotPossible()
-