Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
MartyIX committed Jan 2, 2024
1 parent 336423e commit 397e6d5
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,27 @@ public async Task TestMethod() {{

await Verify.VerifyAnalyzer(source, expected);
}

[Fact]
public async void False_DoesNotTriggerInNestedTask()
{
var source = @"
using System.Threading.Tasks;
using Xunit;
public class TestClass {
[Fact]
public async Task TestMethod() {
var t = Task.Run(async () => {
await Task.Delay(1).ConfigureAwait(false);
});
await t;
}
}";

await Verify.VerifyAnalyzer(source);
}
}

#if NETCOREAPP
Expand Down

0 comments on commit 397e6d5

Please sign in to comment.