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

SelectSelect_SourceIsAnArray_ExecutionIsDefered() private method

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

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