public void BaseCollection_Count_GetWithList_ReturnsExpected() { var collection = new CustomBaseCollection(new ArrayList { 1, 2, 3 }); Assert.Equal(3, collection.Count); }
public void BaseCollection_GetEnumerator_InvokeWithList_Success() { var collection = new CustomBaseCollection(new ArrayList { 1, 2, 3 }); IEnumerator enumerator = collection.GetEnumerator(); Assert.True(enumerator.MoveNext()); Assert.Equal(1, enumerator.Current); }
public void BaseCollection_CopyTo_InvokeWithList_Success() { var collection = new CustomBaseCollection(new ArrayList { 1, 2, 3 }); var array = new object[] { 0, 0, 0, 0, 4 }; collection.CopyTo(array, 1); Assert.Equal(new object[] { 0, 1, 2, 3, 4 }, array); }