public void Should_Return_multiplication_of_factors_equals_to_number() { for (int i = 2; i < 100; i++) { Assert.AreEqual(i, PrimeFactors.Generate(i).Mult()); } }
public void Should_Return_input_number_When_number_is_a_prime_number(int number) { CollectionAssert.AreEquivalent(new List <int> { number }, PrimeFactors.Generate(number)); }
public void Should_Return_list_of_lower_primes_When_number_is_not_a_prime_number(int number) { Assert.IsTrue(PrimeFactors.Generate(number).All(factor => factor < number)); }
public void Should_Return_empty_list_When_number_is_less_or_equal_to_one(int number) { CollectionAssert.IsEmpty(PrimeFactors.Generate(number)); }