public void Insert_TestMethod_1() { list.Add(1); list.Add(1); list.Add(1); list.Insert(1, 2); Assert.AreEqual(2, list[1]); Assert.AreEqual(4, list.Count); }
public void InsertTestMethod() { MyListArray <int> list = new MyListArray <int>(2); list.Add(100); list.Add(101); list.Insert(2, 7); list.Insert(1, 6); list.Insert(0, 5); Assert.AreEqual(list[0], 5); Assert.AreEqual(list[1], 100); Assert.AreEqual(list[2], 6); Assert.AreEqual(list[3], 101); Assert.AreEqual(list[4], 7); }
public void TestInsert() { MyListArray<int> ints = new MyListArray<int>(new int[] { 1, 2, 3, 4, 5 }); ints.Insert(2, 8); Assert.AreEqual(8, ints[2]); Assert.AreEqual(3, ints[3]); Assert.AreEqual(5, ints[5]); }
public void InsertOutOfRangeTestMethod() { MyListArray <int> list = new MyListArray <int>(2); list.Add(100); list.Add(101); list.Insert(3, 4); }
public void TestInsert() { MyListArray <int> ints = new MyListArray <int>(new int[] { 1, 2, 3, 4, 5 }); ints.Insert(2, 8); Assert.AreEqual(8, ints[2]); Assert.AreEqual(3, ints[3]); Assert.AreEqual(5, ints[5]); }