public void EnumerateEmptyCollection() { var collection = new SimpleCollection(); Assert.Empty(collection); var enumerator = collection.GetEnumerator(); Assert.False(enumerator.MoveNext()); }
public void EnumerateNonEmptyCollection() { var collection = new SimpleCollection(); collection.TestBaseAdd(SimpleCollection.TestElement); Assert.NotEmpty(collection); var enumerator = collection.GetEnumerator(); Assert.True(enumerator.MoveNext()); Assert.Equal(SimpleCollection.TestElement, enumerator.Current); Assert.False(enumerator.MoveNext()); }