Esempio n. 1
0
 public void ArraywithZeroTest()
 {
     Assert.AreEqual(0, TwoSlice.Solution(new int[10]));
 }
Esempio n. 2
0
 public void TwoElementsTest()
 {
     Assert.AreEqual(0, TwoSlice.Solution(new [] { 2, 3 }));
 }
Esempio n. 3
0
 public void NegativeTest()
 {
     int[] A = new[] { 3, 6, -5, 4, -8, 2, 5 };
     Assert.AreEqual(2, TwoSlice.Solution(A));
 }
Esempio n. 4
0
 public void Example2Test()
 {
     Assert.AreEqual(2, TwoSlice.Solution(new [] { 5, 10, -3, 0, 0, 0 }));
 }
Esempio n. 5
0
 public void TwoSliceExampleTest()
 {
     Assert.AreEqual(2, TwoSlice.Solution(new [] { 5, 6, 0, 0, 8, 3, 0, 0, 5, 3 }));
 }
Esempio n. 6
0
 public void ReverseOrderTest()
 {
     Assert.AreEqual(18, TwoSlice.Solution(Enumerable.Range(1, 20).Reverse().ToArray()));
 }
Esempio n. 7
0
 public void ExampleTest()
 {
     Assert.AreEqual(1, TwoSlice.Solution(new [] { 4, 2, 2, 5, 1, 8 }));
 }