Update algorithms/CSharp/test/Maths/fibonacci-seires.cs

Co-authored-by: Ming Tsai <37890026+ming-tsai@users.noreply.github.com>
pull/821/head
Alfonso Ridao 2022-08-28 09:12:59 +02:00 committed by GitHub
parent c23d3e07d6
commit a225726518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -1,18 +1,16 @@
using System.Collections.Generic;
using NUnit.Framework;
namespace Algorithms.Tests.Maths {
namespace Algorithms.Tests.Maths
{
[TestFixture]
public class fibonacci_seires {
public class FibonacciSequence
{
[TestCase(20, new int[] { 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181 })]
[TestCase(30, new int[] { 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229 })]
public void CalculateFibonacciSeriesTest(int value, int[] expected) {
var result = Algorithms.Maths.FibonacciSequence.FibonacciSeries(value);
Assert.AreEqual(expected, result);
}
}
}