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

ContainsKey_NullKey_ThrowsArgumentNullException() private method

private ContainsKey_NullKey_ThrowsArgumentNullException ( ) : void
return void
        public static void ContainsKey_NullKey_ThrowsArgumentNullException()
        {
            var sortList1 = new SortedList();
            Helpers.PerformActionOnAllSortedListWrappers(sortList1, sortList2 =>
            {
                Assert.Throws<ArgumentNullException>("key", () => sortList2.Contains(null)); // Key is null
                Assert.Throws<ArgumentNullException>("key", () => sortList2.ContainsKey(null)); // Key is null
            });
        }
SortedListTests