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