Skip to content

Commit 3f0cd58

Browse files
committed
Fix build
1 parent 6299cb9 commit 3f0cd58

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/CodeActionEndToEndTestBase.NetFx.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ internal GenerateMethodCodeActionResolver[] CreateRazorCodeActionResolvers(
333333
new GenerateMethodCodeActionResolver(
334334
roslynCodeActionHelpers,
335335
new LspDocumentMappingService(FilePathService, new TestDocumentContextFactory(), LoggerFactory),
336-
razorFormattingService)
336+
razorFormattingService,
337+
new FileSystem())
337338
];
338339
}

src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/CodeActions/Razor/ComponentAccessibilityCodeActionProviderTest.cs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
using Microsoft.CodeAnalysis.Razor.ProjectSystem;
1515
using Microsoft.CodeAnalysis.Razor.Protocol;
1616
using Microsoft.CodeAnalysis.Razor.Protocol.CodeActions;
17+
using Microsoft.CodeAnalysis.Razor.Workspaces;
1718
using Microsoft.CodeAnalysis.Testing;
1819
using Microsoft.NET.Sdk.Razor.SourceGenerators;
1920
using Microsoft.VisualStudio.LanguageServer.Protocol;
@@ -45,7 +46,7 @@ public async Task Handle_NoTagName_DoesNotProvideLightBulb()
4546

4647
var context = CreateRazorCodeActionContext(request, cursorPosition, documentPath, contents, new SourceSpan(0, 1));
4748

48-
var provider = new ComponentAccessibilityCodeActionProvider();
49+
var provider = new ComponentAccessibilityCodeActionProvider(new FileSystem());
4950

5051
// Act
5152
var commandOrCodeActionContainer = await provider.ProvideAsync(context, DisposalToken);
@@ -74,7 +75,7 @@ public async Task Handle_InvalidSyntaxTree_NoStartNode()
7475
var context = CreateRazorCodeActionContext(request, cursorPosition, documentPath, contents, new SourceSpan(0, 0));
7576
context.CodeDocument.SetFileKind(FileKinds.Legacy);
7677

77-
var provider = new ComponentAccessibilityCodeActionProvider();
78+
var provider = new ComponentAccessibilityCodeActionProvider(new FileSystem());
7879

7980
// Act
8081
var commandOrCodeActionContainer = await provider.ProvideAsync(context, DisposalToken);
@@ -102,7 +103,7 @@ public async Task Handle_CursorOutsideComponent()
102103

103104
var context = CreateRazorCodeActionContext(request, cursorPosition, documentPath, contents, new SourceSpan(contents.IndexOf("Component", StringComparison.Ordinal), 9));
104105

105-
var provider = new ComponentAccessibilityCodeActionProvider();
106+
var provider = new ComponentAccessibilityCodeActionProvider(new FileSystem());
106107

107108
// Act
108109
var commandOrCodeActionContainer = await provider.ProvideAsync(context, DisposalToken);
@@ -130,7 +131,7 @@ public async Task Handle_ExistingComponent_SupportsFileCreationTrue_ReturnsResul
130131

131132
var context = CreateRazorCodeActionContext(request, cursorPosition, documentPath, contents, new SourceSpan(contents.IndexOf("Component", StringComparison.Ordinal), 9), supportsFileCreation: true);
132133

133-
var provider = new ComponentAccessibilityCodeActionProvider();
134+
var provider = new ComponentAccessibilityCodeActionProvider(new FileSystem());
134135

135136
// Act
136137
var commandOrCodeActionContainer = await provider.ProvideAsync(context, DisposalToken);
@@ -177,7 +178,7 @@ public async Task Handle_ExistingComponent_CaseIncorrect_ReturnsResults()
177178

178179
var context = CreateRazorCodeActionContext(request, cursorPosition, documentPath, contents, new SourceSpan(contents.IndexOf("CompOnent", StringComparison.Ordinal), 9), supportsFileCreation: true);
179180

180-
var provider = new ComponentAccessibilityCodeActionProvider();
181+
var provider = new ComponentAccessibilityCodeActionProvider(new FileSystem());
181182

182183
// Act
183184
var commandOrCodeActionContainer = await provider.ProvideAsync(context, DisposalToken);
@@ -226,7 +227,7 @@ @using Fully.Qualified
226227

227228
var context = CreateRazorCodeActionContext(request, cursorPosition, documentPath, contents, new SourceSpan(contents.IndexOf("CompOnent", StringComparison.Ordinal), 9), supportsFileCreation: true);
228229

229-
var provider = new ComponentAccessibilityCodeActionProvider();
230+
var provider = new ComponentAccessibilityCodeActionProvider(new FileSystem());
230231

231232
// Act
232233
var commandOrCodeActionContainer = await provider.ProvideAsync(context, DisposalToken);
@@ -267,7 +268,7 @@ public async Task Handle_ExistingGenericComponent_SupportsFileCreationTrue_Retur
267268

268269
var context = CreateRazorCodeActionContext(request, cursorPosition, documentPath, contents, new SourceSpan(contents.IndexOf("GenericComponent", StringComparison.Ordinal), "GenericComponent".Length), supportsFileCreation: true);
269270

270-
var provider = new ComponentAccessibilityCodeActionProvider();
271+
var provider = new ComponentAccessibilityCodeActionProvider(new FileSystem());
271272

272273
// Act
273274
var commandOrCodeActionContainer = await provider.ProvideAsync(context, DisposalToken);
@@ -314,7 +315,7 @@ public async Task Handle_NewComponent_SupportsFileCreationTrue_ReturnsResult()
314315

315316
var context = CreateRazorCodeActionContext(request, cursorPosition, documentPath, contents, new SourceSpan(contents.IndexOf("Component", StringComparison.Ordinal), 9), supportsFileCreation: true);
316317

317-
var provider = new ComponentAccessibilityCodeActionProvider();
318+
var provider = new ComponentAccessibilityCodeActionProvider(new FileSystem());
318319

319320
// Act
320321
var commandOrCodeActionContainer = await provider.ProvideAsync(context, DisposalToken);
@@ -344,7 +345,7 @@ public async Task Handle_NewComponent_CaretInAttribute_ReturnsResult()
344345

345346
var context = CreateRazorCodeActionContext(request, cursorPosition, documentPath, contents, new SourceSpan(contents.IndexOf("Component", StringComparison.Ordinal), 9), supportsFileCreation: true);
346347

347-
var provider = new ComponentAccessibilityCodeActionProvider();
348+
var provider = new ComponentAccessibilityCodeActionProvider(new FileSystem());
348349

349350
// Act
350351
var commandOrCodeActionContainer = await provider.ProvideAsync(context, DisposalToken);
@@ -374,7 +375,7 @@ public async Task Handle_NewComponent_SupportsFileCreationFalse_ReturnsEmpty()
374375

375376
var context = CreateRazorCodeActionContext(request, cursorPosition, documentPath, contents, new SourceSpan(contents.IndexOf("Component", StringComparison.Ordinal), 9), supportsFileCreation: false);
376377

377-
var provider = new ComponentAccessibilityCodeActionProvider();
378+
var provider = new ComponentAccessibilityCodeActionProvider(new FileSystem());
378379

379380
// Act
380381
var commandOrCodeActionContainer = await provider.ProvideAsync(context, DisposalToken);
@@ -402,7 +403,7 @@ public async Task Handle_ExistingComponent_SupportsFileCreationFalse_ReturnsResu
402403

403404
var context = CreateRazorCodeActionContext(request, cursorPosition, documentPath, contents, new SourceSpan(contents.IndexOf("Component", StringComparison.Ordinal), 9), supportsFileCreation: false);
404405

405-
var provider = new ComponentAccessibilityCodeActionProvider();
406+
var provider = new ComponentAccessibilityCodeActionProvider(new FileSystem());
406407

407408
// Act
408409
var commandOrCodeActionContainer = await provider.ProvideAsync(context, DisposalToken);

0 commit comments

Comments
 (0)