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

IList_NonGeneric_Remove_ValueThatExistsTwiceInCollection() private method

private IList_NonGeneric_Remove_ValueThatExistsTwiceInCollection ( int count ) : void
count int
return void
        public void IList_NonGeneric_Remove_ValueThatExistsTwiceInCollection(int count)
        {
            if (!IsReadOnly && !ExpectedFixedSize && DuplicateValuesAllowed)
            {
                int seed = count * 90;
                IList collection = NonGenericIListFactory(count);
                object value = CreateT(seed++);
                collection.Add(value);
                collection.Add(value);
                count += 2;
                collection.Remove(value);
                Assert.True(collection.Contains(value));
                Assert.Equal(count - 1, collection.Count);
            }
        }
IList_NonGeneric_Tests