Browse Source

Making more tests async.

Bart De Smet 7 years ago
parent
commit
934fcd563c
36 changed files with 236 additions and 231 deletions
  1. 17 12
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/AsyncEnumerableTests.cs
  2. 16 16
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Aggregate.cs
  3. 4 4
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/All.cs
  4. 4 4
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Any.cs
  5. 3 3
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Concat.cs
  6. 6 6
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Count.cs
  7. 4 4
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/DefaultIfEmpty.cs
  8. 8 8
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ElementAt.cs
  9. 2 2
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ElementAtOrDefault.cs
  10. 10 10
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/First.cs
  11. 4 4
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/FirstOrDefault.cs
  12. 8 8
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ForEachAsync.cs
  13. 10 10
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.cs
  14. 9 9
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupJoin.cs
  15. 10 10
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Join.cs
  16. 10 10
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Last.cs
  17. 4 4
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LastOrDefault.cs
  18. 6 6
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LongCount.cs
  19. 8 8
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.cs
  20. 2 2
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Reverse.cs
  21. 4 4
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Select.cs
  22. 10 10
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SelectMany.cs
  23. 10 10
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SequenceEqual.cs
  24. 16 16
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Single.cs
  25. 8 8
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SingleOrDefault.cs
  26. 2 2
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Skip.cs
  27. 4 4
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SkipWhile.cs
  28. 2 2
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Take.cs
  29. 4 4
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/TakeWhile.cs
  30. 2 2
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Throw.cs
  31. 2 2
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToArray.cs
  32. 7 7
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToAsyncEnumerable.cs
  33. 6 6
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToDictionary.cs
  34. 2 2
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToList.cs
  35. 6 6
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Where.cs
  36. 6 6
      Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Zip.cs

+ 17 - 12
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/AsyncEnumerableTests.cs

@@ -14,38 +14,44 @@ namespace Tests
     public class AsyncEnumerableTests
     {
         protected static readonly IAsyncEnumerable<int> Return42 = new[] { 42 }.ToAsyncEnumerable();
-        private static Func<Exception, bool> SingleInnerExceptionMatches(Exception ex) => e => ((AggregateException)e).Flatten().InnerExceptions.Single() == ex;
 
         private const int WaitTimeoutMs = 5000;
 
-#pragma warning disable xUnit1013 // Public method should be marked as test
-        public void AssertThrowsAsync<TException>(Task t)
+        protected async Task AssertThrowsAsync<TException>(Task t)
+            where TException : Exception
         {
-            AssertThrows<AggregateException>(() => t.Wait(WaitTimeoutMs), ex => ex.Flatten().InnerExceptions.Single() is TException);
+            await Assert.ThrowsAsync<TException>(() => t);
         }
 
-        public void AssertThrowsAsync(Task t, Exception e)
+        protected async Task AssertThrowsAsync(Task t, Exception e)
         {
-            AssertThrows(() => t.Wait(WaitTimeoutMs), SingleInnerExceptionMatches(e));
+            try
+            {
+                await t;
+            }
+            catch (Exception ex)
+            {
+                Assert.Same(e, ex);
+            }
         }
 
-        public void AssertThrowsAsync<T>(ValueTask<T> t, Exception e)
+        protected Task AssertThrowsAsync<T>(ValueTask<T> t, Exception e)
         {
-            AssertThrows(() => t.Wait(WaitTimeoutMs), SingleInnerExceptionMatches(e));
+            return AssertThrowsAsync(t.AsTask(), e);
         }
 
-        public async Task NoNextAsync<T>(IAsyncEnumerator<T> e)
+        protected async Task NoNextAsync<T>(IAsyncEnumerator<T> e)
         {
             Assert.False(await e.MoveNextAsync());
         }
 
-        public async Task HasNextAsync<T>(IAsyncEnumerator<T> e, T value)
+        protected async Task HasNextAsync<T>(IAsyncEnumerator<T> e, T value)
         {
             Assert.True(await e.MoveNextAsync());
             Assert.Equal(value, e.Current);
         }
 
-        public async Task SequenceIdentity<T>(IAsyncEnumerable<T> enumerable)
+        protected async Task SequenceIdentity<T>(IAsyncEnumerable<T> enumerable)
         {
             var en1 = enumerable.GetAsyncEnumerator();
             var en2 = enumerable.GetAsyncEnumerator();
@@ -60,7 +66,6 @@ namespace Tests
 
             res1.ShouldAllBeEquivalentTo(res2);
         }
-#pragma warning restore xUnit1013 // Public method should be marked as test
 
         protected static IAsyncEnumerable<TValue> Throw<TValue>(Exception exception)
         {

+ 16 - 16
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Aggregate.cs

@@ -45,29 +45,29 @@ namespace Tests
         }
 
         [Fact]
-        public void Aggregate2()
+        public async Task Aggregate2Async()
         {
             var xs = new int[0].ToAsyncEnumerable();
             var ys = xs.Aggregate((x, y) => x * y);
-            AssertThrowsAsync<InvalidOperationException>(ys);
+            await AssertThrowsAsync<InvalidOperationException>(ys);
         }
 
         [Fact]
-        public void Aggregate3()
+        public async Task Aggregate3Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex);
             var ys = xs.Aggregate((x, y) => x * y);
-            AssertThrowsAsync(ys, ex);
+            await AssertThrowsAsync(ys, ex);
         }
 
         [Fact]
-        public void Aggregate4()
+        public async Task Aggregate4Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var ys = xs.Aggregate(new Func<int, int, int>((x, y) => { throw ex; }));
-            AssertThrowsAsync(ys, ex);
+            await AssertThrowsAsync(ys, ex);
         }
 
         [Fact]
@@ -87,21 +87,21 @@ namespace Tests
         }
 
         [Fact]
-        public void Aggregate7()
+        public async Task Aggregate7Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex);
             var ys = xs.Aggregate(1, (x, y) => x * y);
-            AssertThrowsAsync(ys, ex);
+            await AssertThrowsAsync(ys, ex);
         }
 
         [Fact]
-        public void Aggregate8()
+        public async Task Aggregate8Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var ys = xs.Aggregate(1, new Func<int, int, int>((x, y) => { throw ex; }));
-            AssertThrowsAsync(ys, ex);
+            await AssertThrowsAsync(ys, ex);
         }
 
         [Fact]
@@ -121,30 +121,30 @@ namespace Tests
         }
 
         [Fact]
-        public void Aggregate11()
+        public async Task Aggregate11Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex);
             var ys = xs.Aggregate(1, (x, y) => x * y, x => x + 1);
-            AssertThrowsAsync(ys, ex);
+            await AssertThrowsAsync(ys, ex);
         }
 
         [Fact]
-        public void Aggregate12()
+        public async Task Aggregate12Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var ys = xs.Aggregate(1, (x, y) => { throw ex; }, x => x + 1);
-            AssertThrowsAsync(ys, ex);
+            await AssertThrowsAsync(ys, ex);
         }
 
         [Fact]
-        public void Aggregate13()
+        public async Task Aggregate13Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var ys = xs.Aggregate<int, int, int>(1, (x, y) => x * y, x => { throw ex; });
-            AssertThrowsAsync(ys, ex);
+            await AssertThrowsAsync(ys, ex);
         }
     }
 }

+ 4 - 4
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/All.cs

@@ -37,19 +37,19 @@ namespace Tests
         }
 
         [Fact]
-        public void All3()
+        public async Task All3Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).All(x => x % 2 == 0);
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void All4()
+        public async Task All4Async()
         {
             var ex = new Exception("Bang!");
             var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().All(new Func<int, bool>(x => { throw ex; }));
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
     }
 }

+ 4 - 4
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Any.cs

@@ -39,19 +39,19 @@ namespace Tests
         }
 
         [Fact]
-        public void Any3()
+        public async Task Any3Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).Any(x => x % 2 == 0);
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void Any4()
+        public async Task Any4Async()
         {
             var ex = new Exception("Bang!");
             var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().Any(new Func<int, bool>(x => { throw ex; }));
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]

+ 3 - 3
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Concat.cs

@@ -44,17 +44,17 @@ namespace Tests
             await HasNextAsync(e, 1);
             await HasNextAsync(e, 2);
             await HasNextAsync(e, 3);
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void Concat3()
+        public async Task Concat3Async()
         {
             var ex = new Exception("Bang");
             var ys = Throw<int>(ex).Concat(new[] { 4, 5, 6 }.ToAsyncEnumerable());
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]

+ 6 - 6
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Count.cs

@@ -40,25 +40,25 @@ namespace Tests
         }
 
         [Fact]
-        public void Count3()
+        public async Task Count3Async()
         {
             var ex = new Exception("Bang!");
             var ys = new[] { 1, 2, 3 }.ToAsyncEnumerable().Count(new Func<int, bool>(x => { throw ex; }));
-            AssertThrowsAsync(ys, ex);
+            await AssertThrowsAsync(ys, ex);
         }
 
         [Fact]
-        public void Count4()
+        public async Task Count4Async()
         {
             var ex = new Exception("Bang!");
-            AssertThrowsAsync(Throw<int>(ex).Count(), ex);
+            await AssertThrowsAsync(Throw<int>(ex).Count(), ex);
         }
 
         [Fact]
-        public void Count5()
+        public async Task Count5Async()
         {
             var ex = new Exception("Bang!");
-            AssertThrowsAsync(Throw<int>(ex).Count(x => x < 3), ex);
+            await AssertThrowsAsync(Throw<int>(ex).Count(x => x < 3), ex);
         }
     }
 }

+ 4 - 4
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/DefaultIfEmpty.cs

@@ -86,23 +86,23 @@ namespace Tests
         }
 
         [Fact]
-        public void DefaultIfEmpty7()
+        public async Task DefaultIfEmpty7Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex).DefaultIfEmpty();
 
             var e = xs.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void DefaultIfEmpty8()
+        public async Task DefaultIfEmpty8Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex).DefaultIfEmpty(24);
 
             var e = xs.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]

+ 8 - 8
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ElementAt.cs

@@ -24,10 +24,10 @@ namespace Tests
         }
 
         [Fact]
-        public void ElementAt1()
+        public async Task ElementAt1Async()
         {
             var res = AsyncEnumerable.Empty<int>().ElementAt(0);
-            AssertThrowsAsync<ArgumentOutOfRangeException>(res);
+            await AssertThrowsAsync<ArgumentOutOfRangeException>(res);
         }
 
         [Fact]
@@ -38,10 +38,10 @@ namespace Tests
         }
 
         [Fact]
-        public void ElementAt3()
+        public async Task ElementAt3Async()
         {
             var res = Return42.ElementAt(1);
-            AssertThrowsAsync<ArgumentOutOfRangeException>(res);
+            await AssertThrowsAsync<ArgumentOutOfRangeException>(res);
         }
 
         [Fact]
@@ -52,18 +52,18 @@ namespace Tests
         }
 
         [Fact]
-        public void ElementAt5()
+        public async Task ElementAt5Async()
         {
             var res = new[] { 1, 42, 3 }.ToAsyncEnumerable().ElementAt(7);
-            AssertThrowsAsync<ArgumentOutOfRangeException>(res);
+            await AssertThrowsAsync<ArgumentOutOfRangeException>(res);
         }
 
         [Fact]
-        public void ElementAt6()
+        public async Task ElementAt6Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).ElementAt(15);
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
     }
 }

+ 2 - 2
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ElementAtOrDefault.cs

@@ -63,11 +63,11 @@ namespace Tests
         }
 
         [Fact]
-        public void ElementAtOrDefault7()
+        public async Task ElementAtOrDefault7Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).ElementAtOrDefault(15);
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
     }
 }

+ 10 - 10
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/First.cs

@@ -26,24 +26,24 @@ namespace Tests
         }
 
         [Fact]
-        public void First1()
+        public async Task First1Async()
         {
             var res = AsyncEnumerable.Empty<int>().First();
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
-        public void First2()
+        public async Task First2Async()
         {
             var res = AsyncEnumerable.Empty<int>().First(x => true);
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
-        public void First3()
+        public async Task First3Async()
         {
             var res = Return42.First(x => x % 2 != 0);
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
@@ -61,19 +61,19 @@ namespace Tests
         }
 
         [Fact]
-        public void First6()
+        public async Task First6Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).First();
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void First7()
+        public async Task First7Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).First(x => true);
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]

+ 4 - 4
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/FirstOrDefault.cs

@@ -61,19 +61,19 @@ namespace Tests
         }
 
         [Fact]
-        public void FirstOrDefault6()
+        public async Task FirstOrDefault6Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).FirstOrDefault();
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void FirstOrDefault7()
+        public async Task FirstOrDefault7Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).FirstOrDefault(x => true);
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]

+ 8 - 8
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ForEachAsync.cs

@@ -48,39 +48,39 @@ namespace Tests
         }
 
         [Fact]
-        public void ForEachAsync3()
+        public async Task ForEachAsync3Async()
         {
             var ex = new Exception("Bang");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
 
-            AssertThrowsAsync(xs.ForEachAsync(x => { throw ex; }), ex);
+            await AssertThrowsAsync(xs.ForEachAsync(x => { throw ex; }), ex);
         }
 
         [Fact]
-        public void ForEachAsync4()
+        public async Task ForEachAsync4Async()
         {
             var ex = new Exception("Bang");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
 
-            AssertThrowsAsync(xs.ForEachAsync((x, i) => { throw ex; }), ex);
+            await AssertThrowsAsync(xs.ForEachAsync((x, i) => { throw ex; }), ex);
         }
 
         [Fact]
-        public void ForEachAsync5()
+        public async Task ForEachAsync5Async()
         {
             var ex = new Exception("Bang");
             var xs = Throw<int>(ex);
 
-            AssertThrowsAsync(xs.ForEachAsync(x => { throw ex; }), ex);
+            await AssertThrowsAsync(xs.ForEachAsync(x => { throw ex; }), ex);
         }
 
         [Fact]
-        public void ForEachAsync6()
+        public async Task ForEachAsync6Async()
         {
             var ex = new Exception("Bang");
             var xs = Throw<int>(ex);
 
-            AssertThrowsAsync(xs.ForEachAsync((x, i) => { throw ex; }), ex);
+            await AssertThrowsAsync(xs.ForEachAsync((x, i) => { throw ex; }), ex);
         }
     }
 }

+ 10 - 10
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.cs

@@ -165,18 +165,18 @@ namespace Tests
         }
 
         [Fact]
-        public void GroupBy4()
+        public async Task GroupBy4Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex);
             var ys = xs.GroupBy(x => x);
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void GroupBy5()
+        public async Task GroupBy5Async()
         {
             var ex = new Exception("Bang!");
             var xs = GetXs(ex).ToAsyncEnumerable();
@@ -184,11 +184,11 @@ namespace Tests
 
             var e = ys.GetAsyncEnumerator();
 
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void GroupBy6()
+        public async Task GroupBy6Async()
         {
             var ex = new Exception("Bang!");
             var xs = GetXs(ex).ToAsyncEnumerable();
@@ -196,7 +196,7 @@ namespace Tests
 
             var e = ys.GetAsyncEnumerator();
 
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         private static IEnumerable<int> GetXs(Exception ex)
@@ -207,18 +207,18 @@ namespace Tests
         }
 
         [Fact]
-        public void GroupBy7()
+        public async Task GroupBy7Async()
         {
             var ex = new Exception("Bang!");
             var xs = Return42;
             var ys = xs.GroupBy(new Func<int, int>(x => { throw ex; }));
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void GroupBy8()
+        public async Task GroupBy8Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 1, 2, 3 }.ToAsyncEnumerable();
@@ -226,7 +226,7 @@ namespace Tests
 
             var e = ys.GetAsyncEnumerator();
 
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]

+ 9 - 9
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupJoin.cs

@@ -59,7 +59,7 @@ namespace Tests
         }
 
         [Fact]
-        public void GroupJoin3()
+        public async Task GroupJoin3Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex);
@@ -68,11 +68,11 @@ namespace Tests
             var res = xs.GroupJoin(ys, x => x % 3, y => y % 3, (x, i) => x + " - " + i.Aggregate("", (s, j) => s + j).Result);
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void GroupJoin4()
+        public async Task GroupJoin4Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable();
@@ -81,11 +81,11 @@ namespace Tests
             var res = xs.GroupJoin(ys, x => x % 3, y => y % 3, (x, i) => x + " - " + i.Aggregate("", (s, j) => s + j).Result);
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void GroupJoin5()
+        public async Task GroupJoin5Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable();
@@ -94,11 +94,11 @@ namespace Tests
             var res = xs.GroupJoin(ys, x => { throw ex; }, y => y % 3, (x, i) => x + " - " + i.Aggregate("", (s, j) => s + j).Result);
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void GroupJoin6()
+        public async Task GroupJoin6Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable();
@@ -107,7 +107,7 @@ namespace Tests
             var res = xs.GroupJoin(ys, x => x % 3, y => { throw ex; }, (x, i) => x + " - " + i.Aggregate("", (s, j) => s + j).Result);
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -126,7 +126,7 @@ namespace Tests
 
             var e = res.GetAsyncEnumerator();
             await HasNextAsync(e, "0 - 36");
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
     }
 }

+ 10 - 10
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Join.cs

@@ -87,7 +87,7 @@ namespace Tests
         }
 
         [Fact]
-        public void Join5()
+        public async Task Join5Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex);
@@ -96,11 +96,11 @@ namespace Tests
             var res = xs.Join(ys, x => x % 3, y => y % 3, (x, y) => x + y);
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void Join6()
+        public async Task Join6Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable();
@@ -109,11 +109,11 @@ namespace Tests
             var res = xs.Join(ys, x => x % 3, y => y % 3, (x, y) => x + y);
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void Join7()
+        public async Task Join7Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable();
@@ -122,11 +122,11 @@ namespace Tests
             var res = xs.Join(ys, x => { throw ex; }, y => y, (x, y) => x + y);
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void Join8()
+        public async Task Join8Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable();
@@ -135,11 +135,11 @@ namespace Tests
             var res = xs.Join(ys, x => x, y => { throw ex; }, (x, y) => x + y);
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void Join9()
+        public async Task Join9Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable();
@@ -148,7 +148,7 @@ namespace Tests
             var res = xs.Join<int, int, int, int>(ys, x => x, y => y, (x, y) => { throw ex; });
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]

+ 10 - 10
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Last.cs

@@ -26,24 +26,24 @@ namespace Tests
         }
 
         [Fact]
-        public void Last1()
+        public async Task Last1Async()
         {
             var res = AsyncEnumerable.Empty<int>().Last();
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
-        public void Last2()
+        public async Task Last2Async()
         {
             var res = AsyncEnumerable.Empty<int>().Last(x => true);
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
-        public void Last3()
+        public async Task Last3Async()
         {
             var res = Return42.Last(x => x % 2 != 0);
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
@@ -61,19 +61,19 @@ namespace Tests
         }
 
         [Fact]
-        public void Last6()
+        public async Task Last6Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).Last();
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void Last7()
+        public async Task Last7Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).Last(x => true);
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]

+ 4 - 4
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LastOrDefault.cs

@@ -61,19 +61,19 @@ namespace Tests
         }
 
         [Fact]
-        public void LastOrDefault6()
+        public async Task LastOrDefault6Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).LastOrDefault();
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void LastOrDefault7()
+        public async Task LastOrDefault7Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).LastOrDefault(x => true);
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]

+ 6 - 6
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LongCount.cs

@@ -40,25 +40,25 @@ namespace Tests
         }
 
         [Fact]
-        public void LongCount3()
+        public async Task LongCount3Async()
         {
             var ex = new Exception("Bang!");
             var ys = new[] { 1, 2, 3 }.ToAsyncEnumerable().LongCount(new Func<int, bool>(x => { throw ex; }));
-            AssertThrowsAsync(ys, ex);
+            await AssertThrowsAsync(ys, ex);
         }
 
         [Fact]
-        public void LongCount4()
+        public async Task LongCount4Async()
         {
             var ex = new Exception("Bang!");
-            AssertThrowsAsync(Throw<int>(ex).LongCount(), ex);
+            await AssertThrowsAsync(Throw<int>(ex).LongCount(), ex);
         }
 
         [Fact]
-        public void LongCount5()
+        public async Task LongCount5Async()
         {
             var ex = new Exception("Bang!");
-            AssertThrowsAsync(Throw<int>(ex).LongCount(x => x < 3), ex);
+            await AssertThrowsAsync(Throw<int>(ex).LongCount(x => x < 3), ex);
         }
     }
 }

+ 8 - 8
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.cs

@@ -55,14 +55,14 @@ namespace Tests
         }
 
         [Fact]
-        public void OrderBy2()
+        public async Task OrderBy2Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 2, 6, 1, 5, 7, 8, 9, 3, 4, 0 }.ToAsyncEnumerable();
             var ys = xs.OrderBy(new Func<int, int>(x => { throw ex; }));
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -75,14 +75,14 @@ namespace Tests
         }
 
         [Fact]
-        public void ThenBy2()
+        public async Task ThenBy2Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 2, 6, 1, 5, 7, 8, 9, 3, 4, 0 }.ToAsyncEnumerable();
             var ys = xs.OrderBy(x => x).ThenBy(new Func<int, int>(x => { throw ex; }));
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -98,14 +98,14 @@ namespace Tests
         }
 
         [Fact]
-        public void OrderByDescending2()
+        public async Task OrderByDescending2Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 2, 6, 1, 5, 7, 8, 9, 3, 4, 0 }.ToAsyncEnumerable();
             var ys = xs.OrderByDescending(new Func<int, int>(x => { throw ex; }));
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -118,14 +118,14 @@ namespace Tests
         }
 
         [Fact]
-        public void ThenByDescending2()
+        public async Task ThenByDescending2Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 2, 6, 1, 5, 7, 8, 9, 3, 4, 0 }.ToAsyncEnumerable();
             var ys = xs.OrderBy(x => x).ThenByDescending(new Func<int, int>(x => { throw ex; }));
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]

+ 2 - 2
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Reverse.cs

@@ -53,14 +53,14 @@ namespace Tests
         }
 
         [Fact]
-        public void Reverse4()
+        public async Task Reverse4Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex);
             var ys = xs.Reverse();
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]

+ 4 - 4
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Select.cs

@@ -48,23 +48,23 @@ namespace Tests
         }
 
         [Fact]
-        public void Select3()
+        public async Task Select3Async()
         {
             var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable();
             var ys = xs.Select(x => 1 / x);
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync<DivideByZeroException>(e.MoveNextAsync().AsTask());
+            await AssertThrowsAsync<DivideByZeroException>(e.MoveNextAsync().AsTask());
         }
 
         [Fact]
-        public void Select4()
+        public async Task Select4Async()
         {
             var xs = new[] { 8, 5, 7 }.ToAsyncEnumerable();
             var ys = xs.Select((x, i) => 1 / i);
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync<DivideByZeroException>(e.MoveNextAsync().AsTask());
+            await AssertThrowsAsync<DivideByZeroException>(e.MoveNextAsync().AsTask());
         }
 
         [Fact]

+ 10 - 10
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SelectMany.cs

@@ -61,18 +61,18 @@ namespace Tests
             await HasNextAsync(e, 0);
             await HasNextAsync(e, 0);
             await HasNextAsync(e, 1);
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void SelectMany3()
+        public async Task SelectMany3Async()
         {
             var ex = new Exception("Bang");
             var xs = Throw<int>(ex);
             var ys = xs.SelectMany(x => Enumerable.Range(0, x).ToAsyncEnumerable());
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -92,7 +92,7 @@ namespace Tests
             await HasNextAsync(e, 0);
             await HasNextAsync(e, 0);
             await HasNextAsync(e, 1);
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -128,18 +128,18 @@ namespace Tests
             await HasNextAsync(e, 0);
             await HasNextAsync(e, 0);
             await HasNextAsync(e, 1);
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void SelectMany7()
+        public async Task SelectMany7Async()
         {
             var ex = new Exception("Bang");
             var xs = Throw<int>(ex);
             var ys = xs.SelectMany((x, i) => Enumerable.Range(0, x).ToAsyncEnumerable());
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -159,7 +159,7 @@ namespace Tests
             await HasNextAsync(e, 0);
             await HasNextAsync(e, 0);
             await HasNextAsync(e, 1);
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -211,7 +211,7 @@ namespace Tests
             await HasNextAsync(e, 6);
             await HasNextAsync(e, 8);
             await HasNextAsync(e, 9);
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -230,7 +230,7 @@ namespace Tests
             await HasNextAsync(e, 3);
             await HasNextAsync(e, 8);
             await HasNextAsync(e, 10);
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]

+ 10 - 10
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SequenceEqual.cs

@@ -73,25 +73,25 @@ namespace Tests
         }
 
         [Fact]
-        public void SequenceEqual6()
+        public async Task SequenceEqual6Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var ys = Throw<int>(ex);
             var res = xs.SequenceEqual(ys);
 
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void SequenceEqual7()
+        public async Task SequenceEqual7Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex);
             var ys = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var res = xs.SequenceEqual(ys);
 
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
@@ -138,25 +138,25 @@ namespace Tests
         }
 
         [Fact]
-        public void SequenceEqual13()
+        public async Task SequenceEqual13Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var ys = Throw<int>(ex);
             var res = xs.SequenceEqual(ys, new Eq());
 
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void SequenceEqual14()
+        public async Task SequenceEqual14Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex);
             var ys = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var res = xs.SequenceEqual(ys, new Eq());
 
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
@@ -169,12 +169,12 @@ namespace Tests
         }
 
         [Fact]
-        public void SequenceEqual16()
+        public async Task SequenceEqual16Async()
         {
             var xs = new[] { 1, 2, -3, 4 }.ToAsyncEnumerable();
             var ys = new[] { 1, -2, 3, 4 }.ToAsyncEnumerable();
             var res = xs.SequenceEqual(ys, new EqEx());
-            AssertThrowsAsync<NotImplementedException>(res);
+            await AssertThrowsAsync<NotImplementedException>(res);
         }
 
         private sealed class EqEx : IEqualityComparer<int>

+ 16 - 16
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Single.cs

@@ -26,24 +26,24 @@ namespace Tests
         }
 
         [Fact]
-        public void Single1()
+        public async Task Single1Async()
         {
             var res = AsyncEnumerable.Empty<int>().Single();
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
-        public void Single2()
+        public async Task Single2Async()
         {
             var res = AsyncEnumerable.Empty<int>().Single(x => true);
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
-        public void Single3()
+        public async Task Single3Async()
         {
             var res = Return42.Single(x => x % 2 != 0);
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
@@ -61,26 +61,26 @@ namespace Tests
         }
 
         [Fact]
-        public void Single6()
+        public async Task Single6Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).Single();
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void Single7()
+        public async Task Single7Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).Single(x => true);
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void Single8()
+        public async Task Single8Async()
         {
             var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().Single();
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
@@ -91,17 +91,17 @@ namespace Tests
         }
 
         [Fact]
-        public void Single10()
+        public async Task Single10Async()
         {
             var res = new[] { 42, 23, 45, 90 }.ToAsyncEnumerable().Single(x => x % 2 != 0);
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
-        public void Single11()
+        public async Task Single11Async()
         {
             var res = new int[0].ToAsyncEnumerable().Single();
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
     }
 }

+ 8 - 8
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SingleOrDefault.cs

@@ -61,26 +61,26 @@ namespace Tests
         }
 
         [Fact]
-        public void SingleOrDefault6()
+        public async Task SingleOrDefault6Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).SingleOrDefault();
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void SingleOrDefault7()
+        public async Task SingleOrDefault7Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).SingleOrDefault(x => true);
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]
-        public void SingleOrDefault8()
+        public async Task SingleOrDefault8Async()
         {
             var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefault();
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]
@@ -98,10 +98,10 @@ namespace Tests
         }
 
         [Fact]
-        public void SingleOrDefault11()
+        public async Task SingleOrDefault11Async()
         {
             var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefault(x => true);
-            AssertThrowsAsync<InvalidOperationException>(res);
+            await AssertThrowsAsync<InvalidOperationException>(res);
         }
 
         [Fact]

+ 2 - 2
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Skip.cs

@@ -65,14 +65,14 @@ namespace Tests
         }
 
         [Fact]
-        public void Skip4()
+        public async Task Skip4Async()
         {
             var ex = new Exception("Bang");
             var xs = Throw<int>(ex);
             var ys = xs.Skip(2);
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]

+ 4 - 4
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SkipWhile.cs

@@ -73,14 +73,14 @@ namespace Tests
         }
 
         [Fact]
-        public void SkipWhile5()
+        public async Task SkipWhile5Async()
         {
             var ex = new Exception("Bang");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var ys = xs.SkipWhile(new Func<int, bool>(x => { throw ex; }));
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -120,14 +120,14 @@ namespace Tests
         }
 
         [Fact]
-        public void SkipWhile9()
+        public async Task SkipWhile9Async()
         {
             var ex = new Exception("Bang");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var ys = xs.SkipWhile(new Func<int, int, bool>((x, i) => { throw ex; }));
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]

+ 2 - 2
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Take.cs

@@ -65,14 +65,14 @@ namespace Tests
         }
 
         [Fact]
-        public void Take4()
+        public async Task Take4Async()
         {
             var ex = new Exception("Bang");
             var xs = Throw<int>(ex);
             var ys = xs.Take(2);
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]

+ 4 - 4
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/TakeWhile.cs

@@ -70,14 +70,14 @@ namespace Tests
         }
 
         [Fact]
-        public void TakeWhile5()
+        public async Task TakeWhile5Async()
         {
             var ex = new Exception("Bang");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var ys = xs.TakeWhile(new Func<int, bool>(x => { throw ex; }));
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -117,14 +117,14 @@ namespace Tests
         }
 
         [Fact]
-        public void TakeWhile9()
+        public async Task TakeWhile9Async()
         {
             var ex = new Exception("Bang");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
             var ys = xs.TakeWhile(new Func<int, int, bool>((x, i) => { throw ex; }));
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
 

+ 2 - 2
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Throw.cs

@@ -17,13 +17,13 @@ namespace Tests
         }
 
         [Fact]
-        public void Throw1()
+        public async System.Threading.Tasks.Task Throw1Async()
         {
             var ex = new Exception("Bang");
             var xs = Throw<int>(ex);
 
             var e = xs.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
     }
 }

+ 2 - 2
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToArray.cs

@@ -37,11 +37,11 @@ namespace Tests
         }
 
         [Fact]
-        public void ToArray3()
+        public async Task ToArray3Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).ToArray();
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
 
         [Fact]

+ 7 - 7
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToAsyncEnumerable.cs

@@ -39,7 +39,7 @@ namespace Tests
             var xs = ToAsyncEnumerable_Sequence(ex).ToAsyncEnumerable();
             var e = xs.GetAsyncEnumerator();
             await HasNextAsync(e, 42);
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         private IEnumerable<int> ToAsyncEnumerable_Sequence(Exception e)
@@ -74,7 +74,7 @@ namespace Tests
         }
 
         [Fact]
-        public void ToAsyncEnumerable4()
+        public async Task ToAsyncEnumerable4Async()
         {
             var ex = new Exception("Bang!");
             var subscribed = false;
@@ -94,7 +94,7 @@ namespace Tests
 
             Assert.True(subscribed);
 
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -236,7 +236,7 @@ namespace Tests
         }
 
         [Fact]
-        public void ToAsyncEnumerable_With_Faulted_Task()
+        public async Task ToAsyncEnumerable_With_Faulted_TaskAsync()
         {
             var ex = new InvalidOperationException();
             var tcs = new TaskCompletionSource<int>();
@@ -245,11 +245,11 @@ namespace Tests
             var xs = tcs.Task.ToAsyncEnumerable();
             var e = xs.GetAsyncEnumerator();
 
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void ToAsyncEnumerable_With_Canceled_Task()
+        public async Task ToAsyncEnumerable_With_Canceled_TaskAsync()
         {
             var tcs = new TaskCompletionSource<int>();
             tcs.SetCanceled();
@@ -257,7 +257,7 @@ namespace Tests
             var xs = tcs.Task.ToAsyncEnumerable();
             var e = xs.GetAsyncEnumerator();
 
-            AssertThrowsAsync<TaskCanceledException>(e.MoveNextAsync().AsTask());
+            await AssertThrowsAsync<TaskCanceledException>(e.MoveNextAsync().AsTask());
         }
 
         private sealed class MyObservable<T> : IObservable<T>

+ 6 - 6
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToDictionary.cs

@@ -55,10 +55,10 @@ namespace Tests
         }
 
         [Fact]
-        public void ToDictionary2()
+        public async Task ToDictionary2Async()
         {
             var xs = new[] { 1, 4, 2 }.ToAsyncEnumerable();
-            AssertThrowsAsync<ArgumentException>(xs.ToDictionary(x => x % 2));
+            await AssertThrowsAsync<ArgumentException>(xs.ToDictionary(x => x % 2));
         }
 
         [Fact]
@@ -71,10 +71,10 @@ namespace Tests
         }
 
         [Fact]
-        public void ToDictionary4()
+        public async Task ToDictionary4Async()
         {
             var xs = new[] { 1, 4, 2 }.ToAsyncEnumerable();
-            AssertThrowsAsync<ArgumentException>(xs.ToDictionary(x => x % 2, x => x + 1));
+            await AssertThrowsAsync<ArgumentException>(xs.ToDictionary(x => x % 2, x => x + 1));
         }
 
         [Fact]
@@ -87,10 +87,10 @@ namespace Tests
         }
 
         [Fact]
-        public void ToDictionary6()
+        public async Task ToDictionary6Async()
         {
             var xs = new[] { 1, 4, 2 }.ToAsyncEnumerable();
-            AssertThrowsAsync<ArgumentException>(xs.ToDictionary(x => x % 2, new Eq()));
+            await AssertThrowsAsync<ArgumentException>(xs.ToDictionary(x => x % 2, new Eq()));
         }
 
         [Fact]

+ 2 - 2
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToList.cs

@@ -37,11 +37,11 @@ namespace Tests
         }
 
         [Fact]
-        public void ToList3()
+        public async Task ToList3Async()
         {
             var ex = new Exception("Bang!");
             var res = Throw<int>(ex).ToList();
-            AssertThrowsAsync(res, ex);
+            await AssertThrowsAsync(res, ex);
         }
     }
 }

+ 6 - 6
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Where.cs

@@ -60,7 +60,7 @@ namespace Tests
             await HasNextAsync(e, 8);
             await HasNextAsync(e, 5);
             await HasNextAsync(e, 7);
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
@@ -74,29 +74,29 @@ namespace Tests
             await HasNextAsync(e, 8);
             await HasNextAsync(e, 5);
             await HasNextAsync(e, 7);
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void Where5()
+        public async Task Where5Async()
         {
             var ex = new Exception("Bang");
             var xs = Throw<int>(ex);
             var ys = xs.Where(x => true);
 
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void Where6()
+        public async Task Where6Async()
         {
             var ex = new Exception("Bang");
             var xs = Throw<int>(ex);
 
             var ys = xs.Where((x, i) => true);
             var e = ys.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]

+ 6 - 6
Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Zip.cs

@@ -62,7 +62,7 @@ namespace Tests
         }
 
         [Fact]
-        public void Zip4()
+        public async Task Zip4Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
@@ -70,11 +70,11 @@ namespace Tests
             var res = xs.Zip(ys, (x, y) => x * y);
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void Zip5()
+        public async Task Zip5Async()
         {
             var ex = new Exception("Bang!");
             var xs = Throw<int>(ex);
@@ -82,11 +82,11 @@ namespace Tests
             var res = xs.Zip(ys, (x, y) => x * y);
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]
-        public void Zip6()
+        public async Task Zip6Async()
         {
             var ex = new Exception("Bang!");
             var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable();
@@ -94,7 +94,7 @@ namespace Tests
             var res = xs.Zip(ys, (x, y) => { if (x > 0) throw ex; return x * y; });
 
             var e = res.GetAsyncEnumerator();
-            AssertThrowsAsync(e.MoveNextAsync(), ex);
+            await AssertThrowsAsync(e.MoveNextAsync(), ex);
         }
 
         [Fact]