Esempio n. 1
0
        public void TestEnumerators()
        {
            IApiKeyService service = GetService();

            IEnumerator <KeyValuePair <string, string> > typedEnumerator
                = service.GetEnumerator();
            IEnumerator enumerator = ((IEnumerable)service).GetEnumerator();

            typedEnumerator.MoveNext();
            enumerator.MoveNext();
            Assert.Equal(_secretKey,
                         (typedEnumerator.Current).Value);
            Assert.Equal(_secretKey,
                         ((KeyValuePair <string, string>)enumerator.Current).Value);
        }