public void StaticListRemoveAtIllegalIndexThrowsException() { //Arrange var list = new StaticList <int>(); var expected = new int[] { 8, 7, 3, 1, 6 }; //Act list.Add(8); list.Add(7); list.Add(11); list.Add(3); list.Add(1); list.Add(6); list.RemoveAt(11); //Assert }
public void StaticListRemoveAtWorksCorrectly() { //Arrange var list = new StaticList <int>(); var expected = new int[] { 8, 7, 3, 1, 6 }; //Act list.Add(8); list.Add(7); list.Add(11); list.Add(3); list.Add(1); list.Add(6); list.RemoveAt(2); var result = list.ToArray(); //Assert CollectionAssert.AreEqual(expected, result); }