Skip to content

Commit

Permalink
Merge pull request #1736 from jnyrup/asyncCleanup
Browse files Browse the repository at this point in the history
Return Task for async/non-async test method
  • Loading branch information
jnyrup committed Nov 9, 2021
2 parents 31fb3cf + 04b4a71 commit 8388e8d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Tests/FluentAssertions.Specs/Types/MethodInfoSelectorSpecs.cs
Expand Up @@ -284,7 +284,7 @@ public void When_selecting_methods_that_are_async_it_should_only_return_the_appl

// Assert
methods.Should().ContainSingle()
.Which.Name.Should().Be("PublicVoidAsyncMethod");
.Which.Name.Should().Be("PublicAsyncMethod");
}

[Fact]
Expand All @@ -298,7 +298,7 @@ public void When_selecting_methods_that_are_not_async_it_should_only_return_the_

// Assert
methods.Should().ContainSingle()
.Which.Name.Should().Be("PublicVoidNotAsyncMethod");
.Which.Name.Should().Be("PublicNonAsyncMethod");
}

[Fact]
Expand Down Expand Up @@ -398,12 +398,9 @@ internal class TestClassForMethodSelectorWithNonInheritableAttributeDerived : Te

internal class TestClassForMethodSelectorWithAsyncAndNonAsyncMethod
{
public async void PublicVoidAsyncMethod()
{
await Task.Yield();
}
public async Task PublicAsyncMethod() => await Task.Yield();

public void PublicVoidNotAsyncMethod() { }
public Task PublicNonAsyncMethod() => Task.CompletedTask;
}

internal class TestClassForMethodReturnTypesSelector
Expand Down

0 comments on commit 8388e8d

Please sign in to comment.