System.Collections.Tests.IList_NonGeneric_Tests.IList_NonGeneric_Insert_ToReadOnlyList C# (CSharp) Méthode

IList_NonGeneric_Insert_ToReadOnlyList() private méthode

private IList_NonGeneric_Insert_ToReadOnlyList ( int count ) : void
count int
Résultat void
        public void IList_NonGeneric_Insert_ToReadOnlyList(int count)
        {
            if (IsReadOnly || ExpectedFixedSize)
            {
                IList list = NonGenericIListFactory(count);
                Assert.Throws<NotSupportedException>(() => list.Insert(count / 2, CreateT(321432)));
                Assert.Equal(count, list.Count);
            }
        }
IList_NonGeneric_Tests