예제 #1
0
        public void ConcatWithNullHead()
        {
            var    tail  = new[] { "second", "third" };
            string head  = null;
            var    whole = MoreEnumerable.Concat(head, tail);

            whole.AssertSequenceEqual(null, "second", "third");
        }
예제 #2
0
        public void ConcatWithEmptyTailSequence()
        {
            string[] tail  = { };
            var      head  = "first";
            var      whole = MoreEnumerable.Concat(head, tail);

            whole.AssertSequenceEqual("first");
        }
예제 #3
0
        public void ConcatWithNonEmptyTailSequence()
        {
            var tail  = new[] { "second", "third" };
            var head  = "first";
            var whole = MoreEnumerable.Concat(head, tail);

            whole.AssertSequenceEqual("first", "second", "third");
        }
예제 #4
0
 public void ConcatIsLazyInTailSequence()
 {
     MoreEnumerable.Concat("head", new BreakingSequence <string>());
 }
예제 #5
0
 public void ConcatWithNullHeadSequence()
 {
     MoreEnumerable.Concat(null, "tail");
 }
예제 #6
0
 public void ConcatWithNullTailSequence()
 {
     MoreEnumerable.Concat("head", null);
 }
예제 #7
0
 public void ConcatWithNullHeadSequence()
 {
     Assert.ThrowsArgumentNullException("head", () =>
                                        MoreEnumerable.Concat(null, "tail"));
 }