Beispiel #1
0
        public void DifferentCountNotEqual()
        {
            var collection = new SimpleCollection();

            collection.TestBaseAdd(SimpleCollection.TestElement);
            Assert.False(new SimpleCollection().Equals(collection));
        }
Beispiel #2
0
        public void AddBaseElementAtIndexSucceeds()
        {
            var collection = new SimpleCollection();

            collection.TestBaseAdd(-1, new SimpleElement());
            Assert.Equal(1, collection.Count);
        }
Beispiel #3
0
        public void BaseIndexReturnsZeroForOneItem()
        {
            var collection = new SimpleCollection();

            collection.TestBaseAdd(SimpleCollection.TestElement);
            Assert.Equal(0, collection.TestBaseIndexOf(SimpleCollection.TestElement));
        }
Beispiel #4
0
 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));
 }
Beispiel #5
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());
 }