Exemplo n.º 1
0
        public async Task NugetClient_Calculate_OK()
        {
            FibonacciHandler handler = new FibonacciHandler();

            ResponseModel result = await handler.Calculate(4000000);

            Assert.Pass();
        }
Exemplo n.º 2
0
        public async Task <ResponseModel> GetFibonacci(long?maxValue = 4000000)
        {
            try
            {
                _logger.LogInformation($"Started calculation...");
                FibonacciHandler handler = new FibonacciHandler();
                return(await handler.Calculate(maxValue));
            }
            catch (Exception e)
            {
                _logger.LogError($"Error while calculating {e}");

                Console.WriteLine(e);
                throw;
            }
        }