public void DoGapTestWithNull() { var gap = 6; var initialNumber = 100; var finalNumber = 110; var gapInPrimes = new GapInPrimes(); var result = gapInPrimes.DoGap(gap, initialNumber, finalNumber); Assert.AreEqual(null, result, "Incorrect"); }
public void DoGapTest() { var gap = 2; var initialNumber = 100; var finalNumber = 110; var gapInPrimes = new GapInPrimes(); var result = gapInPrimes.DoGap(gap, initialNumber, finalNumber); Assert.IsTrue(new long[] { 101, 103 }.SequenceEqual(result), "Incorrect"); }
public void DoGapLongTest() { var gap = 8; var initialNumber = (long)3e6; var finalNumber = (long)4e6; var gapInPrimes = new GapInPrimes(); var result = gapInPrimes.DoGap(gap, initialNumber, finalNumber); Assert.IsTrue(new long[] { 3000953, 3000961 }.SequenceEqual(result), "Incorrect"); }