System.Collections.Tests.SortedListTests.SetByIndex_InvalidIndex_ThrowsArgumentOutOfRangeExeption C# (CSharp) Méthode

SetByIndex_InvalidIndex_ThrowsArgumentOutOfRangeExeption() private méthode

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