Example #1
0
        public void TestAddition()
        {
            const string firstNumber    = "2525";
            const string secondNumber   = "5252";
            const string expectedResult = "7777";

            _calculatorPage.CalculateNumbers(firstNumber, secondNumber, MathematicalOperation.ADDITION);
            NgDriver.WaitForAngular();

            Assert.AreEqual(expectedResult, _calculatorPage.GetResult());
        }
Example #2
0
        //test case for calculation page
        public void AddTwoNumber()
        {
            var Add    = new CalculatorPage(driver);
            int input1 = 4;
            int input2 = 4;

            Add.openCalculator();
            //Add 2 numbers
            Add.EnterfristValue(input1.ToString());
            Add.EnterSecondValue(input2.ToString());
            Add.PressGo();
            String ActualResult    = Add.GetResult();
            int    ExpectedlResult = input1 + input2;

            //Check that the expression and result are correct in the grid
            Assert.IsTrue(ActualResult.Equals(ExpectedlResult.ToString()), "Not worked Successfully");
        }
 public void AddPositiveNumbers()
 {
     calculatorPage.Calculate(4, 25, "+");
     calculatorPage.GetResult().Should().Be("29");
 }