Ejemplo n.º 1
0
        public void GetEnumerator_ShouldResolveWithoutNullReferenceException()
        {
            // Arrange
            var dict = new ItemsDictionary();

            // Act and Assert
            IEnumerable en = (IEnumerable)dict;

            Assert.NotNull(en.GetEnumerator());
        }
Ejemplo n.º 2
0
        public void CopyTo_ShouldCopyItemsWithoutNullReferenceException()
        {
            // Arrange
            var dict  = new ItemsDictionary();
            var pairs = new KeyValuePair <object, object>[] { new KeyValuePair <object, object>("first", "value") };

            // Act and Assert
            ICollection <KeyValuePair <object, object> > cl = (ICollection <KeyValuePair <object, object> >)dict;

            cl.CopyTo(pairs, 0);
        }