Пример #1
0
        public IEnumerable <T> EachTest <T>(IEnumerable <T> source, Action <T> action)
        {
            IEnumerable <T> result = EnumerableExtension.Each <T>(source, action);

            return(result);
            // TODO: add assertions to method EnumerableExtensionTest.EachTest(IEnumerable`1<!!0>, Action`1<!!0>)
        }
Пример #2
0
        public void When_Called_Must_Execute_Each_Item()
        {
            var list = new List <string> {
                "value1", "value2"
            };
            var joined = "";

            EnumerableExtension.Each(list, item => joined += item);
            Assert.AreEqual("value1value2", joined);
        }