public void OneAndZeroTest() { int[] A = new int[] { 1, 0, 1, 0 }; Assert.AreEqual(5, NumberOfDisc.Solution(A)); }
public void OverflowTestTest() { int[] A = Enumerable.Repeat(int.MaxValue, 100000).ToArray(); Assert.AreEqual(-1, NumberOfDisc.Solution(A)); }
public void EnumeratorTest() { int[] A = new int[] { 0, 1, 2, 3, 4 }; Assert.AreEqual(10, NumberOfDisc.Solution(A)); }
public void AllOneTest() { int[] A = new int[] { 1, 1, 1, 1, 1 }; Assert.AreEqual(4, NumberOfDisc.Solution(A)); }
public void AllZeroTest() { int[] A = new int[5]; Assert.AreEqual(0, NumberOfDisc.Solution(A)); }
public void ExampleTest() { Assert.AreEqual(11, NumberOfDisc.Solution(new int[] { 11, 5, 2, 1, 4, 0 })); }