Exemplo n.º 1
0
 public void AddToTest(int[] array, int idx, int value, int[] expectedArray)
 {
     DataStructure.ArrayList actual = new DataStructure.ArrayList(array);
     actual.AddTo(idx, value);
     DataStructure.ArrayList expected = new DataStructure.ArrayList(expectedArray);
     Assert.AreEqual(expected, actual);
 }
Exemplo n.º 2
0
 public void AddToNegativeTest(int[] array, int idx, int value)
 {
     DataStructure.ArrayList actual = new DataStructure.ArrayList(array);
     Assert.Throws <IndexOutOfRangeException>(() => actual.AddTo(idx, value));
 }