Ejemplo n.º 1
0
        public void CorrectLargestPrimeFactor(long target, int expectedLargestPrimeFactor)
        {
            var service =  new LargestPrimeFactorService();

            var largestPrimeFactor = service.CalculateLargestPrimeFactor(target);

            Assert.That(largestPrimeFactor, Is.EqualTo(expectedLargestPrimeFactor));
        }
Ejemplo n.º 2
0
 public void ThrowsForNumbersBelowTwo()
 {
     var service = new LargestPrimeFactorService();
     Assert.Throws<InvalidOperationException>(() => service.CalculateLargestPrimeFactor(1));
 }