System.Text.RegularExpressions.Tests.GroupCollectionTests.IListOfT_IndexOf C# (CSharp) Method

IListOfT_IndexOf() private method

private IListOfT_IndexOf ( ) : void
return void
        public static void IListOfT_IndexOf()
        {
            IList<Group> collection = CreateCollection();

            int i = 0;
            foreach (Group item in collection)
            {
                Assert.Equal(i, collection.IndexOf(item));
                i++;
            }

            foreach (Group item in CreateCollection())
            {
                Assert.Equal(-1, collection.IndexOf(item));
            }
        }