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

GetKeyList_IndexOf() private méthode

private GetKeyList_IndexOf ( ) : void
Résultat void
        public static void GetKeyList_IndexOf()
        {
            SortedList sortList1 = Helpers.CreateStringSortedList(100);
            Helpers.PerformActionOnAllSortedListWrappers(sortList1, sortList2 =>
            {
                IList keys = sortList2.GetKeyList();

                for (int i = 0; i < keys.Count; i++)
                {
                    string key = "Key_" + i.ToString("D2");
                    Assert.Equal(i, keys.IndexOf(key));
                }

                Assert.Equal(-1, keys.IndexOf("Key_101"));
            });
        }
SortedListTests