public void SetElementThrowTest() { var list = new VSArray <int>(new[] { 1, 2, 3 }); Assert.Throws(typeof(ArgumentOutOfRangeException), () => list.SetElement(-1, 0)); Assert.Throws(typeof(ArgumentOutOfRangeException), () => list.SetElement(8, 0)); }
public void SetElementTest() { var list = new VSArray <int>(new[] { 1, 2, 3, 4, 5, 6 }); list.SetElement(0, 10); Assert.That(list.GetElement(0), Is.EqualTo(10)); list.SetElement(3, 10); Assert.That(list.GetElement(3), Is.EqualTo(10)); }