diff --git a/Directory.Packages.props b/Directory.Packages.props index a68191d2c..89022ed8a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -42,7 +42,7 @@ - + diff --git a/tests/JustSaying.UnitTests/Messaging/Channels/ChannelsTests.cs b/tests/JustSaying.UnitTests/Messaging/Channels/ChannelsTests.cs index 6bbc52a43..f2f22091d 100644 --- a/tests/JustSaying.UnitTests/Messaging/Channels/ChannelsTests.cs +++ b/tests/JustSaying.UnitTests/Messaging/Channels/ChannelsTests.cs @@ -295,7 +295,7 @@ public async Task Messages_Not_Dispatched_After_Cancellation() cts.CancelAfter(_timeoutPeriod); - await Assert.ThrowsAnyAsync(async () => await runTask); + await Assert.ThrowsAnyAsync(() => runTask); dispatchedBeforeCancelled.ShouldBeGreaterThan(0); dispatchedAfterCancelled.ShouldBe(0); diff --git a/tests/JustSaying.UnitTests/Messaging/Channels/MultiplexerTests/MergingMultiplexerTests.cs b/tests/JustSaying.UnitTests/Messaging/Channels/MultiplexerTests/MergingMultiplexerTests.cs index f0840a2f5..c73342490 100644 --- a/tests/JustSaying.UnitTests/Messaging/Channels/MultiplexerTests/MergingMultiplexerTests.cs +++ b/tests/JustSaying.UnitTests/Messaging/Channels/MultiplexerTests/MergingMultiplexerTests.cs @@ -52,13 +52,13 @@ public void Cannot_Add_Invalid_Reader() } [Fact] - public void Cannot_Get_Messages_Before_Started() + public async Task Cannot_Get_Messages_Before_Started() { // Arrange using var multiplexer = new MergingMultiplexer(10, _outputHelper.ToLogger()); // Act and Assert - Assert.ThrowsAsync(async () => await ReadAllMessages(multiplexer)); + await Assert.ThrowsAsync(() => ReadAllMessages(multiplexer)); } [Fact] @@ -119,4 +119,4 @@ private static async Task ReadAllMessages(IMultiplexer multiplexer) { } } -} \ No newline at end of file +} diff --git a/tests/JustSaying.UnitTests/Messaging/Policies/CanCreatePolicy.cs b/tests/JustSaying.UnitTests/Messaging/Policies/CanCreatePolicy.cs index 8a34ae0ac..bd79089a3 100644 --- a/tests/JustSaying.UnitTests/Messaging/Policies/CanCreatePolicy.cs +++ b/tests/JustSaying.UnitTests/Messaging/Policies/CanCreatePolicy.cs @@ -55,17 +55,17 @@ public async Task Can_Integrate_With_Polly_Policies_Async() new PollyMiddleware(pollyPolicy)); var calledCount = 0; - await Assert.ThrowsAsync(async () => await policy.RunAsync("context", ct => + await Assert.ThrowsAsync(() => policy.RunAsync("context", ct => { calledCount++; throw new CustomException(); }, CancellationToken.None)); - await Assert.ThrowsAsync(async () => await policy.RunAsync("context", ct => + await Assert.ThrowsAsync(() => policy.RunAsync("context", ct => { calledCount++; throw new CustomException(); }, CancellationToken.None)); - await Assert.ThrowsAsync(async () => await policy.RunAsync("context", ct => + await Assert.ThrowsAsync(() => policy.RunAsync("context", ct => { calledCount++; throw new CustomException(); @@ -88,4 +88,4 @@ public CustomException() { } } -} \ No newline at end of file +}