-
-
Notifications
You must be signed in to change notification settings - Fork 108
feat(migration): add Assert.Warn support and Is.Positive/Negative tests #4363
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
Converts NUnit's Assert.Warn() to Skip.Test() with "Warning: " prefix. NUnit's Assert.Warn outputs a warning but allows the test to continue. Since TUnit doesn't have a direct equivalent, this converts to a skip with a warning prefix so users can identify and handle these cases. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Adds test coverage for NUnit's Is.Positive and Is.Negative constraints, including their negated forms (Is.Not.Positive, Is.Not.Negative). These patterns were already implemented but lacked test coverage. Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Test review |
|
PR Review for #4363 Summary: Adds Assert.Warn support for NUnit migration (converts to Skip.Test with warning prefix) and adds test coverage for Is.Positive/Negative patterns. Critical Issues: None found Suggestions: String interpolation creates unnecessary nested braces in CreateWarnAssertion. The method produces output with nested braces which works but is aesthetically suboptimal. However, this is functionally correct and follows existing patterns. Verdict: APPROVE - No critical issues found. Implementation follows existing patterns, includes comprehensive test coverage. |
Summary
Assert.Warnhandling for NUnit migration - converts toSkip.Test($"Warning: {message}")since TUnit doesn't have a direct warning equivalentIs.Positive,Is.Negative,Is.Not.Positive, andIs.Not.Negativepatterns which were implemented but lacked testsTest plan
NUnit_Warn_Convertedtest validates Assert.Warn conversionNUnit_Is_Positive_Converted,NUnit_Is_Negative_Converted,NUnit_Is_Not_Positive_Converted,NUnit_Is_Not_Negative_Convertedtests validate positive/negative patterns🤖 Generated with Claude Code