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

Select_SourceIsAnArray_ExecutionIsDeferred() private method

private Select_SourceIsAnArray_ExecutionIsDeferred ( ) : void
return void
        public void Select_SourceIsAnArray_ExecutionIsDeferred()
        {
            bool funcCalled = false;
            Func<int>[] source = new Func<int>[] { () => { funcCalled = true; return 1; } };

            IEnumerable<int> query = source.Select(d => d());
            Assert.False(funcCalled);
        }
SelectTests