public void DifferentCountNotEqual() { var collection = new SimpleCollection(); collection.TestBaseAdd(SimpleCollection.TestElement); Assert.False(new SimpleCollection().Equals(collection)); }
public void AddBaseElementAtIndexSucceeds() { var collection = new SimpleCollection(); collection.TestBaseAdd(-1, new SimpleElement()); Assert.Equal(1, collection.Count); }
public void BaseIndexReturnsZeroForOneItem() { var collection = new SimpleCollection(); collection.TestBaseAdd(SimpleCollection.TestElement); Assert.Equal(0, collection.TestBaseIndexOf(SimpleCollection.TestElement)); }
public void CopyToCopiesItem() { var collection = new SimpleCollection(); collection.TestBaseAdd(SimpleCollection.TestElement); ConfigurationElement[] array = new ConfigurationElement[1]; collection.CopyTo(array, 0); Assert.Equal(SimpleCollection.TestElement, array.GetValue(0)); }
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()); }