Example #1
0
 public void DisposableDictionaryEnumerator()
 {
     MockDictionary dict = new MockDictionary();
     dict.Add(1, "one");
     Assert.IsFalse(dict.EnumeratorDisposed);
     DictionaryHelper.GetEntries(dict);
     Assert.IsTrue(dict.EnumeratorDisposed);
 }
Example #2
0
        public void DisposableDictionaryEnumerator()
        {
            MockDictionary dict = new MockDictionary();

            dict.Add(1, "one");
            Assert.IsFalse(dict.EnumeratorDisposed);
            DictionaryHelper.GetEntries(dict);
            Assert.IsTrue(dict.EnumeratorDisposed);
        }
        public void DisposableDictionaryEnumerator()
        {
            var dict = new MockDictionary {
                { 1, "one" }
            };

            Assert.IsFalse(dict.EnumeratorDisposed);
            DictionaryHelper.GetEntries(dict);
            Assert.IsTrue(dict.EnumeratorDisposed);
        }
Example #4
0
 public DictionaryEnumerator(MockDictionary dictionary, IDictionaryEnumerator inner)
 {
     _dictionary = dictionary;
     _inner      = inner;
 }
Example #5
0
 public DictionaryEnumerator(MockDictionary dictionary, IDictionaryEnumerator inner)
 {
     _dictionary = dictionary;
     _inner = inner;
 }