Ejemplo n.º 1
0
        public void Factorial_Numbers_EqualTo()
        {
            // Act
            int result     = _calculator.Factorial(4);
            int zeroResult = _calculator.Factorial(0);

            // Assert
            Assert.That(result, Is.EqualTo(24));
            Assert.That(zeroResult, Is.EqualTo(1));
        }
Ejemplo n.º 2
0
        public void FactorialOfNegativeNumber(double num1, double expected)
        {
            Calculator calculator = new Calculator();
            double     result     = calculator.Factorial(num1);

            Assert.AreEqual(expected, result);
        }