-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add support for NUnit version 4. #612
Conversation
06d112f
to
e90ff7e
Compare
@mikkelbu I have tested this extensively with my work projects and converted about 50,000 classic asserts, including StringAssert and CollectionAssert. In addition it converted string format-specification+params into formattable strings. I didn't make separate PRs as some build on others (params -> interpolatable). We can release this as 3.90. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @manfred-brands 👍 . I've reviewed the majority of the changes, but I still need to review 21 files (mostly the new analyzers and code-fixes). I should have time for this tomorrow.
So far I've only some minor comments and questions.
src/nunit.analyzers.tests/WithinUsage/WithinUsageCodeFixTests.cs
Outdated
Show resolved
Hide resolved
...nit.analyzers.tests/DiagnosticSuppressors/DereferencePossiblyNullReferenceSuppressorTests.cs
Show resolved
Hide resolved
...nit.analyzers.tests/DiagnosticSuppressors/DereferencePossiblyNullReferenceSuppressorTests.cs
Show resolved
Hide resolved
...nit.analyzers.tests/DiagnosticSuppressors/DereferencePossiblyNullReferenceSuppressorTests.cs
Show resolved
Hide resolved
...nit.analyzers.tests/DiagnosticSuppressors/DereferencePossiblyNullReferenceSuppressorTests.cs
Show resolved
Hide resolved
Detect ClassicAssert Convert Classic format + params into InterpolatedString
NUnit4 will then use the PropertyComparer testing each individual property for Equals.
Use ClassicAssert consistently.
e90ff7e
to
ecdf110
Compare
I have added the two mentioned changes and rebased on latest master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tremendous work @manfred-brands 👍. I found CodeFixHelper.cs a little hard to follow, so perhaps we need some more tests of this (we can also postpone this - just so we can release all the improvements as quickly as possible).
I'm happy to get this in (and release it) when you are
...teStringFormatToInterpolatableString/UpdateStringFormatToInterpolatableStringCodeFixTests.cs
Show resolved
Hide resolved
src/nunit.analyzers.tests/WithinUsage/WithinUsageAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
src/nunit.analyzers.tests/WithinUsage/WithinUsageAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
@mikkelbu There are some discussions about renaming the ClassicAsserts which would mean changing this. |
Detect ClassicAssert
Fixes #610
Fixes #606
Fixes #562
Fixes #617
Fixes #618
Fixes #620