System.Linq.Tests.SelectTests.SelectSelect_SourceIsAList_ExecutionIsDefered C# (CSharp) Méthode

SelectSelect_SourceIsAList_ExecutionIsDefered() private méthode

private SelectSelect_SourceIsAList_ExecutionIsDefered ( ) : void
Résultat void
        public void SelectSelect_SourceIsAList_ExecutionIsDefered()
        {
            bool funcCalled = false;
            List<Func<int>> source = new List<Func<int>>() { () => { funcCalled = true; return 1; } };

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