Exemplo n.º 1
0
        public void GetPrimes_returns_prime_numbers_less_than_given(int limit, int[] primes)
        {
            var service = new PrimeNumberProvider();
            var result  = service.GetPrimes(limit);

            Assert.Equal <int>(primes, result);
        }
Exemplo n.º 2
0
        public IActionResult Index()
        {
            //The primeNumberProvider service dependency used
            var primes = primeNumberProvider.GetPrimes(MaxPrimeNumber);

            ViewData["Primes"] = primes;

            return(View());
        }