// [TestCase(new int[] { 1, 2, 3, 4, 5 }, 13, 25, new int[] { 1, 2, 3, 4, 5 })] public void AddAtTest(int[] array, int idx, int val, int[] ex) { LinkedListProject.LinkedList lList = new LinkedListProject.LinkedList(); if (idx < 0 || idx > array.Length) { Assert.Throws <Exception>(() => lList.AddAt(idx, val)); } else { lList.AddLast(array); lList.AddAt(idx, val); int[] actual = lList.ToArray(); Assert.AreEqual(ex, actual); } }