public GenerateBetween ( int lower, int upper ) : IEnumerable |
||
lower | int | |
upper | int | |
return | IEnumerable |
public void primes_from_two_untill_five() { var generator = new PrimeNumberGenerator(); var result = generator.GenerateBetween(2, 5).ToList(); Assert.That(result[0], Is.EqualTo(2)); Assert.That(result[1], Is.EqualTo(3)); Assert.That(result[2], Is.EqualTo(5)); }
public void primes_from_104742() { var generator = new PrimeNumberGenerator(); var result = generator.GenerateBetween(104742, 104743).First(); Assert.That(result, Is.EqualTo(104743)); }
public void primes_from_two() { var generator = new PrimeNumberGenerator(); var result = generator.GenerateBetween(2, 2).First(); Assert.That(result, Is.EqualTo(2)); }