Пример #1
0
        public void TestZipWhenThrowingExceptions()
        {
            int[]    numbers = null;
            string[] words   = { "one", "two", "three", "nine", "six" };

            var result = LINQFunctions.Zip(numbers, words, (first, second) => first + " " + second);

            Assert.Throws <ArgumentNullException>(() => result.Count());
        }
Пример #2
0
        public void TestZip()
        {
            int[]    numbers = { 1, 2, 3, 4 };
            string[] words   = { "one", "two", "three", "nine", "six" };

            var result = LINQFunctions.Zip(numbers, words, (first, second) => first + " " + second);

            Assert.True(result.Contains("3 three"));
        }