예제 #1
0
 public void Enumerable_Single()
 {
     SingleSource.Zip(new List <ISingleSource <int> >()
     {
         SingleSource.Just(1)
     }, Sum)
     .Test()
     .AssertResult(1);
 }
예제 #2
0
 public void Enumerable_MoveNext_Crash()
 {
     SingleSource.Zip(new FailingEnumerable <ISingleSource <int> >(false, true, false), Sum)
     .Test()
     .AssertFailure(typeof(InvalidOperationException));
 }
예제 #3
0
 public void Array_Single()
 {
     SingleSource.Zip(new ISingleSource <int>[] { SingleSource.Just(1) }, Sum)
     .Test()
     .AssertResult(1);
 }
예제 #4
0
 public void Enumerable_Empty()
 {
     SingleSource.Zip(new List <ISingleSource <int> >(), Sum)
     .Test()
     .AssertFailure(typeof(IndexOutOfRangeException));
 }
예제 #5
0
 public void Array_Empty()
 {
     SingleSource.Zip(new ISingleSource <int> [0], Sum)
     .Test()
     .AssertFailure(typeof(IndexOutOfRangeException));
 }