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

Select_SourceIsAnArray_ExecutionIsDeferred() private méthode

private Select_SourceIsAnArray_ExecutionIsDeferred ( ) : void
Résultat 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