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

Item_Get() private méthode

private Item_Get ( int count ) : void
count int
Résultat void
        public static void Item_Get(int count)
        {
            SortedList sortList1 = Helpers.CreateStringSortedList(count);
            Helpers.PerformActionOnAllSortedListWrappers(sortList1, sortList2 =>
            {
                for (int i = 0; i < count; i++)
                {
                    string key = "Key_" + i.ToString("D2");
                    string value = "Value_" + i;
                    Assert.Equal(value, sortList2[key]);
                }
                Assert.Null(sortList2["No Such Key"]);

                string removedKey = "Key_01";
                sortList2.Remove(removedKey);
                Assert.Null(sortList2[removedKey]);
            });
        }
SortedListTests