|
@@ -61,7 +61,7 @@ namespace Tests
|
|
|
HasNext(e, 0);
|
|
|
HasNext(e, 0);
|
|
|
HasNext(e, 1);
|
|
|
- AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), (Exception ex_) => ((AggregateException)ex_).Flatten().InnerExceptions.Single() == ex);
|
|
|
+ AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), SingleInnerExceptionMatches(ex));
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
@@ -72,7 +72,7 @@ namespace Tests
|
|
|
var ys = xs.SelectMany(x => Enumerable.Range(0, x).ToAsyncEnumerable());
|
|
|
|
|
|
var e = ys.GetAsyncEnumerator();
|
|
|
- AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), (Exception ex_) => ((AggregateException)ex_).Flatten().InnerExceptions.Single() == ex);
|
|
|
+ AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), SingleInnerExceptionMatches(ex));
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
@@ -92,7 +92,7 @@ namespace Tests
|
|
|
HasNext(e, 0);
|
|
|
HasNext(e, 0);
|
|
|
HasNext(e, 1);
|
|
|
- AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), (Exception ex_) => ((AggregateException)ex_).Flatten().InnerExceptions.Single() == ex);
|
|
|
+ AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), SingleInnerExceptionMatches(ex));
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
@@ -128,7 +128,7 @@ namespace Tests
|
|
|
HasNext(e, 0);
|
|
|
HasNext(e, 0);
|
|
|
HasNext(e, 1);
|
|
|
- AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), (Exception ex_) => ((AggregateException)ex_).Flatten().InnerExceptions.Single() == ex);
|
|
|
+ AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), SingleInnerExceptionMatches(ex));
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
@@ -139,7 +139,7 @@ namespace Tests
|
|
|
var ys = xs.SelectMany((x, i) => Enumerable.Range(0, x).ToAsyncEnumerable());
|
|
|
|
|
|
var e = ys.GetAsyncEnumerator();
|
|
|
- AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), (Exception ex_) => ((AggregateException)ex_).Flatten().InnerExceptions.Single() == ex);
|
|
|
+ AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), SingleInnerExceptionMatches(ex));
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
@@ -159,7 +159,7 @@ namespace Tests
|
|
|
HasNext(e, 0);
|
|
|
HasNext(e, 0);
|
|
|
HasNext(e, 1);
|
|
|
- AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), (Exception ex_) => ((AggregateException)ex_).Flatten().InnerExceptions.Single() == ex);
|
|
|
+ AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), SingleInnerExceptionMatches(ex));
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
@@ -211,7 +211,7 @@ namespace Tests
|
|
|
HasNext(e, 6);
|
|
|
HasNext(e, 8);
|
|
|
HasNext(e, 9);
|
|
|
- AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), (Exception ex_) => ((AggregateException)ex_).Flatten().InnerExceptions.Single() == ex);
|
|
|
+ AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), SingleInnerExceptionMatches(ex));
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
@@ -230,7 +230,7 @@ namespace Tests
|
|
|
HasNext(e, 3);
|
|
|
HasNext(e, 8);
|
|
|
HasNext(e, 10);
|
|
|
- AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), (Exception ex_) => ((AggregateException)ex_).Flatten().InnerExceptions.Single() == ex);
|
|
|
+ AssertThrows(() => e.MoveNextAsync().Wait(WaitTimeoutMs), SingleInnerExceptionMatches(ex));
|
|
|
}
|
|
|
|
|
|
[Fact]
|