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

Select_SourceIsICollection_ExecutionIsDeferred() private method

private Select_SourceIsICollection_ExecutionIsDeferred ( ) : void
return void
        public void Select_SourceIsICollection_ExecutionIsDeferred()
        {
            bool funcCalled = false;
            ICollection<Func<int>> source = new LinkedList<Func<int>>(new List<Func<int>>() { () => { funcCalled = true; return 1; } });

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