public void SecondElementTestThrow() { var list = new VSArray <int>(); Assert.Throws(typeof(ArgumentOutOfRangeException), () => list.SecondElement()); list.AddElement(2); Assert.Throws(typeof(ArgumentOutOfRangeException), () => list.SecondElement()); }
public void AddElementTest() { var list = new VSArray <char>(new[] { 'a', 'b', 'c', 'd', 'e' }); Assert.That(list.GetElementCount(), Is.EqualTo(5)); list.AddElement('f'); Assert.That(list.GetElementCount(), Is.EqualTo(6)); Assert.That(list.GetElement(5), Is.EqualTo('f')); }