Пример #1
0
        public void FilterStringTest()
        {
            var list = MapFilterFold.Filter(new List <string>()
            {
                "Queue", "List", "Map", "Set"
            }, x => x.Length > 3);
            var answerList = new List <string>()
            {
                "Queue", "List"
            };

            Assert.IsTrue(CheckEquality(list, answerList));
        }
Пример #2
0
        public void FilterIntTest()
        {
            var list = MapFilterFold.Filter(new List <int>()
            {
                3, 1, 4, 1, 5
            }, x => x % 2 == 1);
            var answerList = new List <int>()
            {
                3, 1, 1, 5
            };

            Assert.IsTrue(CheckEquality(list, answerList));
        }