Skip to content

Add analyzer favorizing Async assertions #7468

Description

@stan-sz

For a test code similar to

Assert.ThrowsExactly<SomeException>(() => foo.BarAsync().GetAwaiter().GetResult());

add an analyzer rule to favor

await Assert.ThrowsExactlyAsync<SomeException>(() => foo.BarAsync());

also adjusting the test method signature, if needed.

Metadata

Metadata

Labels

area/analyzersMSTest.Analyzers Roslyn analyzers and code fixes.
No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions