Esempio 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);
 }
Esempio 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));
 }