Example #1
0
        public void Number_VerifyNumberIsFactorial()
        {
            //Arrange
            var number = new Faker().Random.Int(0, 30);
            //Act
            var factorialNumber = new FactorialNumber(number);

            //Assert
            Assert.Equal(number, factorialNumber.Number);
        }
Example #2
0
        public void Number_FactorialNumber_VerificarExecaoComNumeroPositivos()
        {
            //Arrange
            var number    = new Faker().Random.Int(10001, 150000);
            var numberInt = new FactorialNumber(number);
            //Act
            var exception = Assert.Throws <Exception>(() => numberInt.FactorialNumberCalc(number));

            //Assert
            Assert.Equal("This value is out of the range", exception.Message);
        }
Example #3
0
        public void TestFactorialNumber6(int numb, int expectedResult)
        {
            int factorialNumb = FactorialNumber.GenerateFactorialNumber(number: numb);

            Assert.AreEqual(expectedResult, factorialNumb);
        }