-
Notifications
You must be signed in to change notification settings - Fork 468
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
Enable FixAll testing by default for all code fix unit tests #1420
Labels
Comments
mavasani
added a commit
to mavasani/roslyn
that referenced
this issue
Nov 30, 2017
Well known batch fixer expects a MEF exported IDocumentTextDifferencingService, but we only have one in the EditorFeatures layer. We already have a simple default differencing service in the workspace, this change exports it at the default service layer. This change unblocks enabling FixAll testing in roslyn-analyzers repo: dotnet/roslyn-analyzers#1420
@ivanbasov As you mentioned a couple of days ago, we are unable to execute well known batch fixer in our unit tests. Underlying reason is captured here: dotnet/roslyn#23492. |
mavasani
added a commit
to mavasani/roslyn-analyzers
that referenced
this issue
Nov 30, 2017
By default, VerifyFix method now tests both iterative code fix application and iterative FixAll application. We still have the VerifyFixAll helper method for tests that want to verify single FixAll application. Fixes dotnet#1420
dotpaul
pushed a commit
to dotpaul/roslyn-analyzers
that referenced
this issue
Sep 26, 2018
All the VerifyXXXFix test helpers now take an optional FixAllScope, which defaults to document/project based on whether the test verifies a single document or multiple documents. After validating the individual diagnostic code fix, the test framework also invokes the FixAll and verifies the result is identical. For unit tests which have multiple fixable diagnostics in the original source code, they should explicitly disable FixAll testing in the VerifyXXXFix call by passing a null FixAllScope and have a separate FixAll test with appropriate baseline. For code fixers which have no FixAll support, they can override a property to turn off FixAll testing for all unit tests. Fixes #dotnet#1420
Done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: