public ActionResult GetNumericSequenceValues(int uservalue) { SequenceNumeric Seq_Num = new SequenceNumeric(); var numbers = Seq_Num.Numbers(uservalue); var odd_numbers = Seq_Num.OddNumbers(uservalue); var even_numbers = Seq_Num.EvenNumbers(uservalue); var custom_numbers = Seq_Num.CustomNumbers(uservalue); var fibonacci_numbers = Seq_Num.FibonacciNumbers(uservalue); return(Json(new { numbers = numbers, oddnumbers = odd_numbers, evennumbers = even_numbers, customnumbers = custom_numbers, fibonaccinumbers = fibonacci_numbers, message = "success" })); }
public void ShouldGetNumbers(int value) { var result = sut.Numbers(value); List <int> numbers = new List <int>(); for (int i = 1; i <= value; i++) { numbers.Add(i); } Assert.That(result, Is.EqualTo(numbers)); }