Example #1
0
        public void Test_DivideMethod()
        {
            BasicMaths bm  = new BasicMaths();
            double     res = bm.Divide(12, 4);

            Assert.AreEqual(res, 3);
        }
Example #2
0
        public void Task_Divide_TwoNumber()
        {
            BasicMaths bm = new BasicMaths();
            // Arrange
            var num1          = 2.9;
            var num2          = 3.1;
            var expectedValue = 0.94; //Rounded value

            // Act
            var div = bm.Divide(num1, num2);

            //Assert
            Assert.Equal(expectedValue, div, 2);
        }