System.Collections.Tests.IList_NonGeneric_Tests.IList_NonGeneric_IndexOf_NullNotContainedInList C# (CSharp) Method

IList_NonGeneric_IndexOf_NullNotContainedInList() private method

private IList_NonGeneric_IndexOf_NullNotContainedInList ( int count ) : void
count int
return void
        public void IList_NonGeneric_IndexOf_NullNotContainedInList(int count)
        {
            if (NullAllowed)
            {
                IList list = NonGenericIListFactory(count);
                object value = null;
                if (list.Contains(value))
                {
                    if (IsReadOnly || ExpectedFixedSize)
                        return;
                    list.Remove(value);
                }
                Assert.Equal(-1, list.IndexOf(value));
            }
        }
IList_NonGeneric_Tests