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

IList_NonGeneric_Add_ToReadOnlyCollection() private method

private IList_NonGeneric_Add_ToReadOnlyCollection ( int count ) : void
count int
return void
        public void IList_NonGeneric_Add_ToReadOnlyCollection(int count)
        {
            if (IsReadOnly || ExpectedFixedSize)
            {
                IList collection = NonGenericIListFactory(count);
                Assert.Throws<NotSupportedException>(() => collection.Add(CreateT(0)));
                Assert.Equal(count, collection.Count);
            }
        }
IList_NonGeneric_Tests