System.Linq.Tests.WhereTests.WhereWhere_Array_ReturnsExpectedValues C# (CSharp) Method

WhereWhere_Array_ReturnsExpectedValues() private method

private WhereWhere_Array_ReturnsExpectedValues ( ) : void
return void
        public void WhereWhere_Array_ReturnsExpectedValues()
        {
            int[] source = new[] { 1, 2, 3, 4, 5 };
            Func<int, bool> evenPredicate = (value) => value % 2 == 0;

            IEnumerable<int> result = source.Where(evenPredicate).Where(evenPredicate);

            Assert.Equal(2, result.Count());
            Assert.Equal(2, result.ElementAt(0));
            Assert.Equal(4, result.ElementAt(1));
        }
WhereTests