Skip to content

Commit

Permalink
Add test for indented usings
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwengier committed Nov 28, 2024
1 parent 0f2d8ee commit 9850344
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,34 @@ @using System
""")]);
}

[Fact]
public async Task PromoteUsingDirective_Indented()
{
await VerifyCodeActionAsync(
input: """
<div>
@using [||]System
</div>

<div>
Hello World
</div>
""",
expected: """
<div>
</div>

<div>
Hello World
</div>
""",
codeActionName: LanguageServerConstants.CodeActions.PromoteUsingDirective,
additionalExpectedFiles: [
(FileUri(@"..\_Imports.razor"), """
@using System
""")]);
}

[Fact]
public async Task PromoteUsingDirective_Mvc()
{
Expand Down

0 comments on commit 9850344

Please sign in to comment.