Example #1
0
 public void Should_return_empty_list_when_input_equal_to_1()
 {
     Assert.That(PrimeFactors.Generate(1), Is.EqualTo(new List <int>()));
 }
Example #2
0
 public void Should_return_input_when_prime_factor_input(int input, int expected)
 {
     Assert.That(PrimeFactors.Generate(input), Is.EqualTo(new List <int> {
         expected
     }));
 }
Example #3
0
 public void Should_return_list_of_2_and_3_when_multiple_of_2_and_3_input(int input, string expected)
 {
     Assert.That(PrimeFactors.Generate(input), Is.EqualTo(expected.ToListOfInt()));
 }
Example #4
0
 public void Generate_ShouldReturnAnListOfInts()
 {
     Assert.That(primefactors.Generate(0), Is.InstanceOf <List <Int32> >());
 }