Esempio n. 1
0
        public void MapDifferentTypesTest()
        {
            var list = MapFilterFold.Map(new List <int>()
            {
                1, 2, 3
            }, x => x.ToString());
            var answerList = new List <string>()
            {
                "1", "2", "3"
            };

            Assert.IsTrue(CheckEquality(list, answerList));
        }
Esempio n. 2
0
        public void MapStringTest()
        {
            var list = MapFilterFold.Map(new List <string>()
            {
                "abc", "bw", "ph"
            }, x => x + "d");
            var answerList = new List <string>()
            {
                "abcd", "bwd", "phd"
            };

            Assert.IsTrue(CheckEquality(list, answerList));
        }
Esempio n. 3
0
        public void MapIntTest()
        {
            var list = MapFilterFold.Map(new List <int>()
            {
                1, 2, 3
            }, x => x * 2);
            var answerList = new List <int>()
            {
                2, 4, 6
            };

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