예제 #1
0
        public void Select()
        {
            var source = new string[] { "A", "B" };
            var list   = new List <int>(ExtensionMethods.Select(source, x => x.Length));

            CollectionAssert.AreEqual(new int[] { 1, 1 }, list, "The projected list is incorrect.");
        }
예제 #2
0
 public void SelectWithNullSelector()
 {
     var source = new string[] { "A", "B" };
     Func <string, int> selector = null;
     var list = ExtensionMethods.Select(source, selector);
 }
예제 #3
0
 public void SelectWithNullSource()
 {
     string[]           source   = null;
     Func <string, int> selector = null;
     var list = ExtensionMethods.Select(source, selector);
 }