public void InputNull() { IReadOnlyList <int> list = null; new Action( () => FastLinq.ElementAt(list, 0)) .Should() .Throw <ArgumentNullException>(); }
public void InputEmpty() { IReadOnlyList <int> list = new int[] { }; new Action( () => FastLinq.ElementAt(list, 0)) .Should() .Throw <ArgumentOutOfRangeException>(); }
public void IndexTooLarge() { IReadOnlyList <int> list = new[] { 1, 2, 3 }; new Action( () => FastLinq.ElementAt(list, 100)) .Should() .Throw <ArgumentOutOfRangeException>(); }
public void NegativeIndex() { IReadOnlyList <int> list = new[] { 1, 2, 3 }; new Action( () => FastLinq.ElementAt(list, -1)) .Should() .Throw <ArgumentOutOfRangeException>(); }
public void NominalCase() { IReadOnlyList <int> list = new[] { 1, 2, 3 }; Assert.AreEqual(3, FastLinq.ElementAt(list, 2)); }
public void Array_FastLinq() { var _ = FastLinq.ElementAt(this.array, ElementToRequest); }
public void List_FastLinq() { var _ = FastLinq.ElementAt(this.list, ElementToRequest); }