Skip to content

Fix xUnit Throws migration docs#5819

Merged
thomhurst merged 1 commit into
mainfrom
fix-xunit-sync-throws-migration
May 2, 2026
Merged

Fix xUnit Throws migration docs#5819
thomhurst merged 1 commit into
mainfrom
fix-xunit-sync-throws-migration

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

  • update xUnit migration docs so sync Assert.Throws<T>(Action) stays sync
  • add focused xUnit migration code-fix tests for sync Throws and async ThrowsAsync

Verification

  • dotnet exec "C:\Program Files\dotnet\sdk\10.0.203\MSBuild.dll" TUnit.Analyzers.Tests\TUnit.Analyzers.Tests.csproj /t:Build /p:Restore=false /v:minimal
  • dotnet TUnit.Analyzers.Tests\bin\Debug\net10.0\TUnit.Analyzers.Tests.dll --treenode-filter "/*/*/XUnitMigrationAnalyzerTests/Assert_Throws_Sync_Delegate_Stays_Sync"
  • dotnet TUnit.Analyzers.Tests\bin\Debug\net10.0\TUnit.Analyzers.Tests.dll --treenode-filter "/*/*/XUnitMigrationAnalyzerTests/Assert_ThrowsAsync_Async_Delegate_Stays_Async"

Closes #5817

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@thomhurst
thomhurst merged commit ce4bcf6 into main May 2, 2026
13 of 15 checks passed
@thomhurst
thomhurst deleted the fix-xunit-sync-throws-migration branch May 2, 2026 21:03
This was referenced May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: The migration from xUnit’s Assert.Throws is incorrect

1 participant