public void TestZipWhenValid() { 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")); }
public void TestZipExceptions() { int[] numbers = null; string[] words = { "one", "two", "three", "nine", "six" }; var result = LinqFunctions.Zip(numbers, words, (first, second) => first + " " + second); var exception = Assert.Throws <ArgumentNullException>(() => result.Count()); Assert.Equal("source", exception.ParamName); }