Пример #1
0
        public void CorrectLargestPrimeFactor(long target, int expectedLargestPrimeFactor)
        {
            var service =  new LargestPrimeFactorService();

            var largestPrimeFactor = service.CalculateLargestPrimeFactor(target);

            Assert.That(largestPrimeFactor, Is.EqualTo(expectedLargestPrimeFactor));
        }
Пример #2
0
 public void ThrowsForNumbersBelowTwo()
 {
     var service = new LargestPrimeFactorService();
     Assert.Throws<InvalidOperationException>(() => service.CalculateLargestPrimeFactor(1));
 }