public void TheFirstPrimeIs2()
        {
            // Arrange
            var calculator = new PrimeCalculator(1);
            var log        = new CalculationLog();

            // Act
            calculator.Calculate(1, log);

            // Assert
            log.Items.Single().Result.Should().Be(2);
        }
示例#2
0
 public void TestFirstPrime()
 {
     Assert.AreEqual(2, PrimeCalculator.Calculate(1), "First prime was not 2.");
 }
示例#3
0
 public void TestHundredthPrime()
 {
     Assert.AreEqual(541, PrimeCalculator.Calculate(100), "Hundredth prime was not 541.");
 }
示例#4
0
 public void TestSeventhPrime()
 {
     Assert.AreEqual(17, PrimeCalculator.Calculate(7), "Seventh prime was not 17.");
 }
示例#5
0
 public void TestThirdPrime()
 {
     Assert.AreEqual(5, PrimeCalculator.Calculate(3), "Thrid prime was not 5.");
 }
示例#6
0
 public void TestSecondPrime()
 {
     Assert.AreEqual(3, PrimeCalculator.Calculate(2), "Second prime was not 3.");
 }