Class CalculatorSteps

java.lang.Object
calculator.CalculatorSteps

public class CalculatorSteps extends Object
  • Constructor Details

    • CalculatorSteps

      public CalculatorSteps()
  • Method Details

    • resetMemoryBeforeEachScenario

      public void resetMemoryBeforeEachScenario()
    • givenIInitialiseACalculator

      @Given("I initialise a calculator") public void givenIInitialiseACalculator()
    • givenAnIntegerOperation

      @Given("an integer operation {string}") public void givenAnIntegerOperation(String s)
    • givenTheFollowingListOfNumbers

      @Given("the following list of integer numbers") public void givenTheFollowingListOfNumbers(List<List<String>> numbers)
    • givenTheSum

      @Given("^the sum of two numbers (\\d+) and (\\d+)$") public void givenTheSum(int n1, int n2)
    • thenItsNotationIs

      @Then("^its (.*) notation is (.*)$") public void thenItsNotationIs(String notation, String s)
    • whenIProvideANumber

      @When("^I provide a (.*) number (-?\\d+)$") public void whenIProvideANumber(String s, int val)
    • 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

      @Then("^the (.*) is (\\d+)$") public void thenTheOperationIs(String s, int val)
    • 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()