Esempio n. 1
0
 public void ReturnTrueIfElementsExist()
 {
     Debug.Assert(ListTest.FindTwo(new[] { 1, 2, 3, 4, 5 }, 5));
     Debug.Assert(ListTest.FindTwo(new[] { 1, 2 }, 3));
     Debug.Assert(ListTest.FindTwo(new[] { -1, 2 }, 1));
     Debug.Assert(ListTest.FindTwo(new[] { 0, 2 }, 2));
 }
Esempio n. 2
0
 public void ReturnFalseIfElementsDontExist()
 {
     Debug.Assert(ListTest.FindTwo(new[] { 10, 20, 30, 40, 50 }, 5));
     Debug.Assert(ListTest.FindTwo(new[] { 10, 20 }, 3));
     Debug.Assert(ListTest.FindTwo(new[] { 10 }, 10));
     Debug.Assert(ListTest.FindTwo(new int[0], 3));
     Debug.Assert(ListTest.FindTwo(null, 3));
 }