System.Collections.Tests.SortedListTests.RemoveAt_InvalidIndex_ThrowsArgumentOutOfRangeException C# (CSharp) Method

RemoveAt_InvalidIndex_ThrowsArgumentOutOfRangeException() private method

        public static void RemoveAt_InvalidIndex_ThrowsArgumentOutOfRangeException()
        {
            SortedList sortList1 = Helpers.CreateIntSortedList(100);
            Helpers.PerformActionOnAllSortedListWrappers(sortList1, sortList2 =>
            {
                Assert.Throws<ArgumentOutOfRangeException>("index", () => sortList2.RemoveAt(-1)); // Index < 0
                Assert.Throws<ArgumentOutOfRangeException>("index", () => sortList2.RemoveAt(sortList2.Count)); // Index >= count
            });
        }
SortedListTests