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

WhereWhere_ICollection_ReturnsExpectedValues() private method

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