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

IList_NonGeneric_Insert_NegativeIndex_ThrowsException() private method

private IList_NonGeneric_Insert_NegativeIndex_ThrowsException ( int count ) : void
count int
return void
        public void IList_NonGeneric_Insert_NegativeIndex_ThrowsException(int count)
        {
            if (!IsReadOnly && !ExpectedFixedSize)
            {
                IList list = NonGenericIListFactory(count);
                object validAdd = CreateT(0);
                Assert.Throws(IList_NonGeneric_Item_InvalidIndex_ThrowType, () => list.Insert(-1, validAdd));
                Assert.Throws(IList_NonGeneric_Item_InvalidIndex_ThrowType, () => list.Insert(int.MinValue, validAdd));
                Assert.Equal(count, list.Count);
            }
        }
IList_NonGeneric_Tests