Example #1
0
        public void EventNumberTest()
        {
            //dataset
            List <int> numbers = new List <int>()
            {
                36, 71, 12,
                15, 29, 18, 27, 17, 9, 34
            };
            SimpleLambda lambda      = new SimpleLambda();
            var          evenNumbers = lambda.EvenNumbers(numbers);

            Assert.AreEqual(evenNumbers.Count(), 4);
        }
Example #2
0
        public void SquareTest()
        {
            //dataset
            List <int> numbers = new List <int>()
            {
                36, 71, 12,
                15, 29, 18, 27, 17, 9, 34
            };
            SimpleLambda lambda  = new SimpleLambda();
            var          squares = lambda.SquareNumber(numbers);

            Assert.AreEqual(squares.Count(), 10);
            Assert.AreEqual(squares.First(), 1296);
        }