Remove await Task.FromResult() and unnecessary async modifiers (#16535)
* Remove await Task.FromResult and unnecessary async modifiers * Remove usage of await Task.WhenAll() to avoid deadlocks * Fix code formatting --------- Co-authored-by: Andy Butland <abutland73@gmail.com>
This commit is contained in:
@@ -75,14 +75,16 @@ public class UserIdKeyResolverTests : UmbracoIntegrationTest
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task Unknown_Key_Throws()
|
||||
public Task Unknown_Key_Throws()
|
||||
{
|
||||
Assert.ThrowsAsync<InvalidOperationException>(async () => await UserIdKeyResolver.GetAsync(Guid.NewGuid()));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task Unknown_Id_Throws()
|
||||
public Task Unknown_Id_Throws()
|
||||
{
|
||||
Assert.ThrowsAsync<InvalidOperationException>(async () => await UserIdKeyResolver.GetAsync(1234567890));
|
||||
Assert.ThrowsAsync<InvalidOperationException>(async () => await UserIdKeyResolver.GetAsync(1234567890));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user