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

WhereWhere_List_ReturnsExpectedValues() private method

private WhereWhere_List_ReturnsExpectedValues ( ) : void
return void
        public void WhereWhere_List_ReturnsExpectedValues()
        {
            List<int> source = new List<int> { 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