Skip to content
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 integration test for Extract to Code Behind when updated Roslyn is available #9264

Open
davidwengier opened this issue Sep 11, 2023 · 0 comments

Comments

@davidwengier
Copy link
Contributor

davidwengier commented Sep 11, 2023

Good tests for #9263 are impossible until VM images are updated. When that happens we should add a test

@ghost ghost added the untriaged label Sep 11, 2023
@phil-allen-msft phil-allen-msft added this to the 17.9 Planning milestone Sep 12, 2023
@ghost ghost removed the untriaged label Sep 12, 2023
davidwengier added a commit that referenced this issue Sep 14, 2023
Fixes #4330
Fixes #8766
Includes #9262 so just review from
8a2b8af
onwards

Goes with dotnet/roslyn#69878 and
dotnet/vscode-csharp#6329

I logged #9264 to follow up with a
better test, though strictly speaking the one I've added id exhaustive
:)

Behaviour of Extract to Code Behind before this change. Note the many
using statements and block scoped namespace.

![ExtractToCodeBehindBefore](https://github.com/dotnet/razor/assets/754264/10ac5595-b3b2-44c2-a1a7-66664d3c8f1b)

Behaviour after this change. Note the file scoped namespace, and file
header.

![ExtractToCodeBehindAfter](https://github.com/dotnet/razor/assets/754264/65160715-bc98-4336-b19d-37f9b14adf94)

The squiggle on `NavigationManager` is due to an `.editorconfig` rule I
have on in that project, requiring `this.` qualification, so is
unrelated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants