public void Number_VerifyNumberIsPerfect_VerifyExceptionForValuesGreater30() { // Arrange var number = new Faker().Random.Int(31, 100); var _fatorialNumber = new FatorialNumber(number); // Act var exception = Assert.Throws <Exception>(() => _fatorialNumber.FatorialNumberCalculator(number)); // Assert Assert.Equal("The number is out of limits!", exception.Message); }
public void Number_FatorialNumberCalculator_VerifyExceptionNegativeNumbers() { // Arrange var number = new Faker().Random.Int(-1000, 0); var _fatorialNumber = new FatorialNumber(number); // Act var exception = Assert.Throws <Exception>(() => _fatorialNumber.FatorialNumberCalculator(number)); // Assert Assert.Equal("The number is out of limits!", exception.Message); }