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

IList_NonGeneric_Clear() private méthode

private IList_NonGeneric_Clear ( int count ) : void
count int
Résultat void
        public void IList_NonGeneric_Clear(int count)
        {
            IList collection = NonGenericIListFactory(count);
            if (IsReadOnly || ExpectedFixedSize)
            {
                Assert.Throws<NotSupportedException>(() => collection.Clear());
                Assert.Equal(count, collection.Count);
            }
            else
            {
                collection.Clear();
                Assert.Equal(0, collection.Count);
            }
        }
IList_NonGeneric_Tests