public static void Main(string[] args) { double[] arr = new double[] { 2, 19, 13 }; Xbonacci xbonacci = new Xbonacci(); double[] print = xbonacci.Tribonacci(arr, 2); Console.WriteLine(string.Join(" ", print)); }
public void Tribonacci_KataExamples_CorrectResult() { var variabonacci = new Xbonacci(); Assert.Multiple(() => { var expected = new double[] { 1, 1, 1, 3, 5, 9, 17, 31, 57, 105 }; var actual = variabonacci.Tribonacci(new double[] { 1, 1, 1 }, 10); Assert.That(actual, Is.EqualTo(expected)); expected = new double[] { 0, 0, 1, 1, 2, 4, 7, 13, 24, 44 }; actual = variabonacci.Tribonacci(new double[] { 0, 0, 1 }, 10); Assert.That(actual, Is.EqualTo(expected)); expected = new double[] { 0, 1, 1, 2, 4, 7, 13, 24, 44, 81 }; actual = variabonacci.Tribonacci(new double[] { 0, 1, 1 }, 10); Assert.That(actual, Is.EqualTo(expected)); }); }
public void Xbonacci_KataExamples_CorrectResult() { var variabonacci = new Xbonacci(); Assert.Multiple(() => { var expected = new double[] { 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 }; var actual = variabonacci.GenericXbonacci(new double[] { 0, 1 }, 10); Assert.That(actual, Is.EqualTo(expected)); expected = new double[] { 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 }; actual = variabonacci.GenericXbonacci(new double[] { 1, 1 }, 10); Assert.That(actual, Is.EqualTo(expected)); expected = new double[] { 0, 0, 0, 0, 1, 1, 2, 4, 8, 16 }; actual = variabonacci.GenericXbonacci(new double[] { 0, 0, 0, 0, 1 }, 10); Assert.That(actual, Is.EqualTo(expected)); expected = new double[] { 1, 0, 0, 0, 0, 0, 1, 2, 3, 6 }; actual = variabonacci.GenericXbonacci(new double[] { 1, 0, 0, 0, 0, 0, 1 }, 10); Assert.That(actual, Is.EqualTo(expected)); }); }
public void XbonacciTest1() { CollectionAssert.AreEqual(new double[] { 1, 1, 1, 3, 5, 9, 17, 31, 57, 105 }, Xbonacci.Tribonacci(new double[] { 1, 1, 1 }, 10)); CollectionAssert.AreEqual(new double[] { 0, 0, 1, 1, 2, 4, 7, 13, 24, 44 }, Xbonacci.Tribonacci(new double[] { 0, 0, 1 }, 10)); CollectionAssert.AreEqual(new double[] { 0, 1, 1, 2, 4, 7, 13, 24, 44, 81 }, Xbonacci.Tribonacci(new double[] { 0, 1, 1 }, 10)); }
public void FirstTestCase() { Assert.Equal(new double [] { 1, 1, 1, 3, 5, 9, 17, 31, 57, 105 }, Xbonacci.Test(new double [] { 1, 1, 1 }, 10)); }
public void ThirdTestCase() { Assert.Equal(new double [] { 0, 1, 1, 2, 4, 7, 13, 24, 44, 81 }, Xbonacci.Test(new double [] { 0, 1, 1 }, 10)); }
public void SecondTestCase() { Assert.Equal(new double [] { 0, 0, 1, 1, 2, 4, 7, 13, 24, 44 }, Xbonacci.Test(new double [] { 0, 0, 1 }, 10)); }
public void SetUp() { variabonacci = new Xbonacci(); }
public void TearDown() { variabonacci = null; }
public void Tests(double[] expectedResult, double[] inputArray, int n) { Xbonacci xbonacci = new Xbonacci(); Assert.AreEqual(expectedResult, xbonacci.Tribonacci(inputArray, n)); }
static void Main(string[] args) { var tribon = new Xbonacci(); var inSignature = new double[] { 3, 8, 7 }; var output = tribon.Tribonacci(inSignature, 32); }
public void GetTribonacciSequence(double[] expected, double[] signature, int n) { var xbonacci = new Xbonacci(); Assert.AreEqual(expected, xbonacci.Tribonacci(signature, n)); }