예제 #1
0
        public void Generate_NumberNeg10_CorrectValue()
        {
            bool success = _seriesService.Generate(-10, out long result);

            Assert.AreEqual(-55, result, 0, "Fib results for 10");
            Assert.True(success);
        }
예제 #2
0
 //[ProducesResponseType(StatusCodes.Status400BadRequest)]
 //[ProducesResponseType(StatusCodes.Status404NotFound)]
 public IActionResult Get([BindRequired, FromQuery(Name = "n")] long number)
 {
     if (_numberService.Generate(number, out long result) == true)
     {
         return(Ok(result));
     }
     return(BadRequest(""));
 }