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

Capacity_Set_ShrinkingCapacity_ThrowsArgumentOutOfRangeException() private method

        public static void Capacity_Set_ShrinkingCapacity_ThrowsArgumentOutOfRangeException()
        {
            SortedList sortList1 = Helpers.CreateIntSortedList(100);
            Helpers.PerformActionOnAllSortedListWrappers(sortList1, sortList2 =>
            {
                Assert.Throws<ArgumentOutOfRangeException>("value", () => sortList2.Capacity = sortList2.Count - 1); // Capacity < count
            });
        }
SortedListTests