System.Linq.Tests.SelectTests.Select_SourceIsAnArray_CurrentIsDefaultOfTAfterEnumeration C# (CSharp) Method

Select_SourceIsAnArray_CurrentIsDefaultOfTAfterEnumeration() private method

        public void Select_SourceIsAnArray_CurrentIsDefaultOfTAfterEnumeration()
        {
            int[] source = new[] { 1 };
            Func<int, int> selector = i => i + 1;

            IEnumerable<int> query = source.Select(selector);

            var enumerator = query.GetEnumerator();
            while (enumerator.MoveNext()) ;

            Assert.Equal(default(int), enumerator.Current);
        }
SelectTests