Change async void tests to async Task (dotnet/extensions#488)

\n\nCommit migrated from d2f4c6a2ed
This commit is contained in:
Javier Calvarro Nelson 2018-11-13 10:11:21 -08:00 committed by GitHub
parent 83c88bd6bd
commit ea14c9c865
1 changed files with 15 additions and 15 deletions

View File

@ -155,7 +155,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningCustomAwaitableOfReferenceType_CanInvokeViaExecute() public async Task TargetMethodReturningCustomAwaitableOfReferenceType_CanInvokeViaExecute()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("CustomAwaitableOfReferenceTypeAsync"); var executor = GetExecutorForMethod("CustomAwaitableOfReferenceTypeAsync");
@ -171,7 +171,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningCustomAwaitableOfValueType_CanInvokeViaExecute() public async Task TargetMethodReturningCustomAwaitableOfValueType_CanInvokeViaExecute()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("CustomAwaitableOfValueTypeAsync"); var executor = GetExecutorForMethod("CustomAwaitableOfValueTypeAsync");
@ -186,7 +186,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningCustomAwaitableOfReferenceType_CanInvokeViaExecuteAsync() public async Task TargetMethodReturningCustomAwaitableOfReferenceType_CanInvokeViaExecuteAsync()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("CustomAwaitableOfReferenceTypeAsync"); var executor = GetExecutorForMethod("CustomAwaitableOfReferenceTypeAsync");
@ -203,7 +203,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningCustomAwaitableOfValueType_CanInvokeViaExecuteAsync() public async Task TargetMethodReturningCustomAwaitableOfValueType_CanInvokeViaExecuteAsync()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("CustomAwaitableOfValueTypeAsync"); var executor = GetExecutorForMethod("CustomAwaitableOfValueTypeAsync");
@ -220,7 +220,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningAwaitableOfVoidType_CanInvokeViaExecuteAsync() public async Task TargetMethodReturningAwaitableOfVoidType_CanInvokeViaExecuteAsync()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("VoidValueMethodAsync"); var executor = GetExecutorForMethod("VoidValueMethodAsync");
@ -235,7 +235,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningAwaitableWithICriticalNotifyCompletion_UsesUnsafeOnCompleted() public async Task TargetMethodReturningAwaitableWithICriticalNotifyCompletion_UsesUnsafeOnCompleted()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("CustomAwaitableWithICriticalNotifyCompletion"); var executor = GetExecutorForMethod("CustomAwaitableWithICriticalNotifyCompletion");
@ -250,7 +250,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningAwaitableWithoutICriticalNotifyCompletion_UsesOnCompleted() public async Task TargetMethodReturningAwaitableWithoutICriticalNotifyCompletion_UsesOnCompleted()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("CustomAwaitableWithoutICriticalNotifyCompletion"); var executor = GetExecutorForMethod("CustomAwaitableWithoutICriticalNotifyCompletion");
@ -265,7 +265,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningValueTaskOfValueType_CanBeInvokedViaExecute() public async Task TargetMethodReturningValueTaskOfValueType_CanBeInvokedViaExecute()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("ValueTaskOfValueType"); var executor = GetExecutorForMethod("ValueTaskOfValueType");
@ -280,7 +280,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningValueTaskOfReferenceType_CanBeInvokedViaExecute() public async Task TargetMethodReturningValueTaskOfReferenceType_CanBeInvokedViaExecute()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("ValueTaskOfReferenceType"); var executor = GetExecutorForMethod("ValueTaskOfReferenceType");
@ -295,7 +295,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningValueTaskOfValueType_CanBeInvokedViaExecuteAsync() public async Task TargetMethodReturningValueTaskOfValueType_CanBeInvokedViaExecuteAsync()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("ValueTaskOfValueType"); var executor = GetExecutorForMethod("ValueTaskOfValueType");
@ -311,7 +311,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningValueTaskOfReferenceType_CanBeInvokedViaExecuteAsync() public async Task TargetMethodReturningValueTaskOfReferenceType_CanBeInvokedViaExecuteAsync()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("ValueTaskOfReferenceType"); var executor = GetExecutorForMethod("ValueTaskOfReferenceType");
@ -326,7 +326,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningFSharpAsync_CanBeInvokedViaExecute() public async Task TargetMethodReturningFSharpAsync_CanBeInvokedViaExecute()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("FSharpAsyncMethod"); var executor = GetExecutorForMethod("FSharpAsyncMethod");
@ -344,7 +344,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningFailingFSharpAsync_CanBeInvokedViaExecute() public async Task TargetMethodReturningFailingFSharpAsync_CanBeInvokedViaExecute()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("FSharpAsyncFailureMethod"); var executor = GetExecutorForMethod("FSharpAsyncFailureMethod");
@ -365,7 +365,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningFSharpAsync_CanBeInvokedViaExecuteAsync() public async Task TargetMethodReturningFSharpAsync_CanBeInvokedViaExecuteAsync()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("FSharpAsyncMethod"); var executor = GetExecutorForMethod("FSharpAsyncMethod");
@ -380,7 +380,7 @@ namespace Microsoft.Extensions.Internal
} }
[Fact] [Fact]
public async void TargetMethodReturningFailingFSharpAsync_CanBeInvokedViaExecuteAsync() public async Task TargetMethodReturningFailingFSharpAsync_CanBeInvokedViaExecuteAsync()
{ {
// Arrange // Arrange
var executor = GetExecutorForMethod("FSharpAsyncFailureMethod"); var executor = GetExecutorForMethod("FSharpAsyncFailureMethod");