public void T11_RemoveAt() { Pet pet1 = new Pet() { Age = 10 }; Pet pet2 = new Pet() { Age = 7 }; Pet pet3 = new Pet() { Age = 1 }; Pet pet4 = new Pet() { Age = 8 }; Pet pet5 = new Pet() { Age = 11 }; SortableArrayList list = new SortableArrayList(); list.Add(pet1); list.Add(pet2); list.Add(pet3); list.Add(pet4); list.RemoveAt(2); Assert.AreEqual(3, list.Count(), "Count should be reduced"); Assert.AreEqual(pet1, list[0], "pet1 should be on first position"); Assert.AreEqual(pet2, list[1], "pet2 should be on second position"); Assert.AreEqual(pet4, list[2], "pet4 should be on third position"); list.RemoveAt(2); Assert.AreEqual(2, list.Count(), "Count should be reduced"); Assert.AreEqual(pet1, list[0], "pet1 should be on first position"); Assert.AreEqual(pet2, list[1], "pet2 should be on second position"); list.RemoveAt(0); Assert.AreEqual(1, list.Count(), "Count should be reduced"); Assert.AreEqual(pet2, list[0], "pet2 should be on first position"); list.RemoveAt(0); Assert.AreEqual(0, list.Count(), "Count should be reduced"); list.Add(pet4); Assert.AreEqual(pet4, list[0], "pet4 should be on first position"); }