-
-
Notifications
You must be signed in to change notification settings - Fork 109
test: add xUnit migration tests for Assert.Empty and using directive removal #4430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…removal Add test coverage proving that the xUnit code fixer correctly handles: - Assert.Empty(List<T>) -> await Assert.That(list).IsEmpty() - Assert.NotEmpty(List<T>) -> await Assert.That(list).IsNotEmpty() - Assert.Empty(Array) -> await Assert.That(array).IsEmpty() - Using directive removal (using Xunit; and using Xunit.Abstractions;) These tests verify that issues #4416, #4417, #4418, #4419, #4420 are working correctly with the existing code fixer implementation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
SummaryAdds test coverage proving that xUnit migration code fixer correctly handles Critical IssuesNone found ✅ SuggestionsNone - these tests follow established patterns and provide valuable coverage for previously reported issues. Verdict✅ APPROVE - No critical issues The tests verify that reported issues (#4418, #4417, #4419, #4416/#4420) already work correctly. Good defensive testing to prevent regressions. |
Summary
Add test coverage proving that the xUnit code fixer correctly handles reported issues:
Assert.Empty(List<T>)->await Assert.That(list).IsEmpty()Assert.NotEmpty(List<T>)->await Assert.That(list).IsNotEmpty()Assert.Empty(Array)->await Assert.That(array).IsEmpty()using Xunit;andusing Xunit.Abstractions;)Investigation Findings
These tests verify that the following reported issues already work correctly:
Assert.Emptyfor collectionsIsEmpty()exists onCollectionAssertionBaseusing Xunit;not removedMigrationHelpers.RemoveFrameworkUsings()handles itAssert.Throwsloses exceptionBatchFixeris configured correctlyThe issues appear to be either from older versions of TUnit or IDE-specific behavior.
Test Plan
🤖 Generated with Claude Code