public void TestMethodSubtraction()
 {
     Assert.AreEqual(CalculatorClass.Subtraction(0, 10), -10);
     Assert.AreEqual(CalculatorClass.Subtraction(8, 8), 0);
     Assert.AreEqual(CalculatorClass.Subtraction(05, 10), -5);
     Assert.AreEqual(CalculatorClass.Subtraction(30, 10), 20);
 }
Exemple #2
0
        public void Subtract02()
        {
            ICalculator subtract       = new CalculatorClass();
            double      value1         = 5;
            double      value2         = 14;
            double      expectedResult = subtract.Subtraction(value1, value2);

            Assert.That(expectedResult, Is.EqualTo(-9));
        }
        public void Subtract02()
        {
            ICalculator subtract  = new CalculatorClass();
            double      value1    = 5;
            double      value2    = 14;
            double      actual    = -9;
            double      tolerance = 0.001;

            double expectedResult = subtract.Subtraction(value1, value2);

            Assert.AreEqual(expectedResult, actual, tolerance);
        }