public async void Error()
 {
     await AsyncEnum.MergeConcurrently(
         AsyncEnumerable.Range(1, 5),
         AsyncEnum.Error <int>(new InvalidOperationException())
         )
     .AssertFailure(typeof(InvalidOperationException), 1, 2, 3, 4, 5);
 }
Example #2
0
        public async void Error()
        {
            var push = new MulticastAsyncEnumerable <int>();

            var t1 = push.AssertFailure(typeof(InvalidOperationException));
            var t2 = push.AssertFailure(typeof(InvalidOperationException));

            await AsyncEnum.Error <int>(new InvalidOperationException())
            .Consume(push);

            await t1;
            await t2;
        }
Example #3
0
 public async void Error_EmitLast()
 {
     await AsyncEnum.Error <int>(new InvalidOperationException())
     .Throttle(TimeSpan.FromMilliseconds(1000), true)
     .AssertFailure(typeof(InvalidOperationException));
 }