2 instantiations of TestLspServer
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
LanguageServer\AbstractLanguageServerProtocolTests.cs (2)
546
var server = new
TestLspServer
(testWorkspace, locations, initializationOptions.ClientCapabilities, languageServer, clientStream);
564
var server = new
TestLspServer
(testWorkspace, locations, clientCapabilities, target, clientStream);
365 references to TestLspServer
IdeBenchmarks (1)
Lsp\LspCompletionBenchmarks.cs (1)
22
private
TestLspServer
? _testServer;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (13)
LanguageServer\AbstractLanguageServerProtocolTests.cs (13)
295
private protected Task<
TestLspServer
> CreateTestLspServerAsync(string markup, LSP.ClientCapabilities clientCapabilities, bool callInitialized = true)
298
private protected Task<
TestLspServer
> CreateTestLspServerAsync(string markup, InitializationOptions? initializationOptions = null)
301
private protected Task<
TestLspServer
> CreateTestLspServerAsync(string[] markups, InitializationOptions? initializationOptions = null)
304
private protected Task<
TestLspServer
> CreateVisualBasicTestLspServerAsync(string markup, InitializationOptions? initializationOptions = null)
307
private Task<
TestLspServer
> CreateTestLspServerAsync(string[] markups, string languageName, InitializationOptions? initializationOptions)
318
private async Task<
TestLspServer
> CreateTestLspServerAsync(TestWorkspace workspace, InitializationOptions initializationOptions)
347
return await
TestLspServer
.CreateAsync(workspace, initializationOptions, TestOutputLspLogger);
350
private protected async Task<
TestLspServer
> CreateXmlTestLspServerAsync(
366
return await
TestLspServer
.CreateAsync(workspace, lspOptions, TestOutputLspLogger);
539
internal static async Task<
TestLspServer
> CreateAsync(TestWorkspace testWorkspace, InitializationOptions initializationOptions, ILspServiceLogger logger)
546
var
server = new TestLspServer(testWorkspace, locations, initializationOptions.ClientCapabilities, languageServer, clientStream);
561
internal static async Task<
TestLspServer
> CreateAsync(TestWorkspace testWorkspace, LSP.ClientCapabilities clientCapabilities, RoslynLanguageServer target, Stream clientStream)
564
var
server = new TestLspServer(testWorkspace, locations, clientCapabilities, target, clientStream);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (347)
CodeActions\CodeActionResolveTests.cs (3)
37
await using
var
testLspServer = await CreateTestLspServerAsync(initialMarkup);
88
await using
var
testLspServer = await CreateTestLspServerAsync(initialMarkup);
139
TestLspServer
testLspServer,
CodeActions\CodeActionsTests.cs (4)
50
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
83
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
119
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
149
TestLspServer
testLspServer,
CodeActions\RunCodeActionsTests.cs (2)
46
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
62
TestLspServer
testLspServer,
CodeLens\AbstractCodeLensTests.cs (1)
21
private protected static async Task VerifyCodeLensAsync(
TestLspServer
testLspServer, int expectedNumberOfReferences, bool isCapped = false)
CodeLens\CSharpCodeLensTests.cs (12)
31
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
50
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
70
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
93
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
107
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
118
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
130
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
142
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
156
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
167
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
181
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
190
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
CodeLens\VisualBasicCodeLensTests.cs (12)
29
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
42
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
56
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
66
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
76
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
87
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
98
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
110
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
122
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
132
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
144
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
154
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
Completion\CompletionResolveTests.cs (11)
60
await using
var
testLspServer = await CreateTestLspServerAsync(markup, clientCapabilities);
85
await using
var
testLspServer = await CreateTestLspServerAsync(markup, new LSP.VSInternalClientCapabilities { SupportsVisualStudioExtensions = true });
109
await using
var
testLspServer = await CreateTestLspServerAsync(markup, new LSP.VSInternalClientCapabilities { SupportsVisualStudioExtensions = true });
151
await using
var
testLspServer = await CreateTestLspServerAsync(markup, clientCapabilities);
180
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
243
await using
var
testLspServer = await CreateTestLspServerAsync(markup, clientCapabilities);
305
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
340
await using
var
testLspServer = await CreateTestLspServerAsync(markup, new LSP.VSInternalClientCapabilities { SupportsVisualStudioExtensions = true });
349
private static async Task<LSP.CompletionItem> RunResolveCompletionItemAsync(
TestLspServer
testLspServer, LSP.CompletionItem completionItem)
386
TestLspServer
testLspServer,
406
TestLspServer
testLspServer,
Completion\CompletionTests.cs (33)
74
await using
var
testLspServer = await CreateTestLspServerAsync(markup, clientCapabilities);
121
await using
var
testLspServer = await CreateTestLspServerAsync(markup, clientCapabilities);
154
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
182
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
209
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
234
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
259
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
293
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
317
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
345
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
370
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
407
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
444
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
496
await using
var
testLspServer = await CreateTestLspServerAsync(markup, clientCapabilities);
528
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
591
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
622
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
650
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
676
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
703
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
755
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
807
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
860
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
926
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
992
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
1087
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
1151
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
1210
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
1282
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
1336
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
1376
await using
var
testLspServer = await CreateTestLspServerAsync(markup, s_vsCompletionCapabilities);
1391
internal static Task<LSP.CompletionList> RunGetCompletionsAsync(
TestLspServer
testLspServer, LSP.CompletionParams completionParams)
1397
private static CompletionListCache GetCompletionListCache(
TestLspServer
testLspServer)
Definitions\GoToDefinitionTests.cs (7)
37
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
64
await using
var
testLspServer = await CreateTestLspServerAsync(markups);
82
await using
var
testLspServer = await CreateTestLspServerAsync(string.Empty);
106
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
122
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
149
await using
var
testLspServer = await CreateXmlTestLspServerAsync(markup);
155
private static async Task<LSP.Location[]> RunGotoDefinitionAsync(
TestLspServer
testLspServer, LSP.Location caret)
Definitions\GoToTypeDefinitionTests.cs (4)
34
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
60
await using
var
testLspServer = await CreateTestLspServerAsync(markups);
78
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
84
private static async Task<LSP.Location[]> RunGotoTypeDefinitionAsync(
TestLspServer
testLspServer, LSP.Location caret)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (11)
56
TestLspServer
testLspServer,
77
TestLspServer
testLspServer,
101
TestLspServer
testLspServer,
165
private protected static Task CloseDocumentAsync(
TestLspServer
testLspServer, Document document) => testLspServer.CloseDocumentAsync(document.GetURI());
202
TestLspServer
testLspServer,
213
private protected static Task OpenDocumentAsync(
TestLspServer
testLspServer, Document document) => testLspServer.OpenDocumentAsync(document.GetURI());
216
TestLspServer
testLspServer,
227
TestLspServer
testLspServer,
297
private protected Task<
TestLspServer
> CreateTestWorkspaceWithDiagnosticsAsync(string markup, BackgroundAnalysisScope scope, bool useVSDiagnostics, bool pullDiagnostics = true)
300
private protected Task<
TestLspServer
> CreateTestWorkspaceWithDiagnosticsAsync(string[] markups, BackgroundAnalysisScope scope, bool useVSDiagnostics, bool pullDiagnostics = true)
303
private protected Task<
TestLspServer
> CreateTestWorkspaceFromXmlAsync(string xmlMarkup, BackgroundAnalysisScope scope, bool useVSDiagnostics, bool pullDiagnostics = true)
Diagnostics\AdditionalFileDiagnosticsTests.cs (3)
38
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics);
67
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics);
110
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics: true);
Diagnostics\PullDiagnosticTests.cs (55)
42
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
56
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
77
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
115
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics: true);
140
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
163
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
191
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics, pullDiagnostics: false);
208
await using
var
testLspServer = await CreateTestLspServerAsync(markup,
227
await using
var
testLspServer = await CreateTestLspServerAsync(markup,
246
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
278
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
305
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
338
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
361
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
390
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
411
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
443
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
492
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics: false);
546
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
592
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
622
await using
var
testLspServer = await CreateTestLspServerAsync(markup,
647
await using
var
testLspServer = await CreateTestLspServerAsync(markup,
669
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics, pullDiagnostics: true);
701
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
740
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
766
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics);
801
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
815
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
834
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
850
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
880
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
903
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
928
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
957
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
984
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
999
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.FullSolution, useVSDiagnostics, pullDiagnostics: true);
1019
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(markup, BackgroundAnalysisScope.OpenFiles, useVSDiagnostics, pullDiagnostics: true);
1040
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
1063
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1076
await using
var
testLspServer = await CreateTestLspServerAsync(
1100
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
1132
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
1160
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
1193
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
1233
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
1254
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
1291
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1363
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1431
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1494
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1549
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1605
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1651
await using
var
testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1667
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
1691
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (2)
29
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(string.Empty, BackgroundAnalysisScope.FullSolution, useVSDiagnostics);
48
await using
var
testLspServer = await CreateTestWorkspaceWithDiagnosticsAsync(string.Empty, BackgroundAnalysisScope.FullSolution, useVSDiagnostics);
DocumentChanges\DocumentChangesTests.cs (5)
323
private async Task<(
TestLspServer
, LSP.Location, string)> GetTestLspServerAndLocationAsync(string source)
325
var
testLspServer = await CreateTestLspServerAsync(source, CapabilitiesWithVSExtensions);
332
private static Task DidOpen(
TestLspServer
testLspServer, Uri uri) => testLspServer.OpenDocumentAsync(uri);
334
private static async Task DidChange(
TestLspServer
testLspServer, Uri uri, params (int line, int column, string text)[] changes)
337
private static async Task DidClose(
TestLspServer
testLspServer, Uri uri) => await testLspServer.CloseDocumentAsync(uri);
DocumentChanges\DocumentChangesTests.LinkedDocuments.cs (3)
31
await using
var
testLspServer = await CreateXmlTestLspServerAsync(workspaceXml);
72
await using
var
testLspServer = await CreateXmlTestLspServerAsync(workspaceXml);
102
private static async Task<Solution> GetLSPSolutionAsync(
TestLspServer
testLspServer, Uri uri)
FoldingRanges\FoldingRangesTests.cs (4)
30
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
46
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
62
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
71
private static async Task<LSP.FoldingRange[]> RunGetFoldingRangeAsync(
TestLspServer
testLspServer)
Formatting\FormatDocumentOnTypeTests.cs (3)
44
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
75
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
86
TestLspServer
testLspServer,
Formatting\FormatDocumentRangeTests.cs (3)
42
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
70
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
80
TestLspServer
testLspServer,
Formatting\FormatDocumentTests.cs (4)
43
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
71
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
99
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
109
TestLspServer
testLspServer,
Highlights\DocumentHighlightTests.cs (4)
40
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
65
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
89
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
95
private static async Task<LSP.DocumentHighlight[]> RunGetDocumentHighlightAsync(
TestLspServer
testLspServer, LSP.Location caret)
Hover\HoverTests.cs (10)
40
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
64
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
87
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
115
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
138
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
187
await using
var
testLspServer = await CreateXmlTestLspServerAsync(workspaceXml, initializationOptions: new InitializationOptions { ClientCapabilities = CapabilitiesWithVSExtensions });
241
await using
var
testLspServer = await CreateTestLspServerAsync(markup, clientCapabilities);
311
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
371
await using
var
testLspServer = await CreateTestLspServerAsync(markup, clientCapabilities);
395
TestLspServer
testLspServer,
InlineCompletions\InlineCompletionsTests.cs (3)
248
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
273
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
290
TestLspServer
testLspServer,
LanguageServerTargetTests.cs (10)
33
await using
var
server = await CreateTestLspServerAsync("");
45
await using
var
server = await CreateTestLspServerAsync("");
57
await using
var
server = await CreateTestLspServerAsync("");
68
await using
var
serverOne = await CreateTestLspServerAsync("");
69
await using
var
serverTwo = await CreateTestLspServerAsync("");
84
await using
var
server = await CreateTestLspServerAsync("");
107
await using
var
server = await CreateTestLspServerAsync("", new InitializationOptions { CallInitialized = false });
124
await using
var
server = await CreateTestLspServerAsync("");
140
private static void AssertServerAlive(
TestLspServer
server)
146
private static async Task AssertServerQueueClosed(
TestLspServer
server)
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (10)
38
await using
var
testLspServer = await CreateTestLspServerAsync(string.Empty, new InitializationOptions { ServerKind = WellKnownLspServerKinds.CSharpVisualBasicLspServer });
61
await using
var
testLspServer = await CreateTestLspServerAsync(string.Empty, new InitializationOptions { ServerKind = WellKnownLspServerKinds.CSharpVisualBasicLspServer });
94
await using
var
testLspServer = await CreateTestLspServerAsync(string.Empty, new InitializationOptions { ServerKind = WellKnownLspServerKinds.CSharpVisualBasicLspServer });
119
await using
var
testLspServer = await CreateTestLspServerAsync(markup, new InitializationOptions { ServerKind = WellKnownLspServerKinds.CSharpVisualBasicLspServer });
140
await using
var
testLspServer = await CreateTestLspServerAsync(string.Empty, new InitializationOptions { ServerKind = WellKnownLspServerKinds.CSharpVisualBasicLspServer });
188
await using
var
testLspServer = await CreateTestLspServerAsync(string.Empty, new InitializationOptions { ServerKind = WellKnownLspServerKinds.CSharpVisualBasicLspServer });
205
private static async Task AssertFileInMiscWorkspaceAsync(
TestLspServer
testLspServer, Uri fileUri)
211
private static async Task AssertFileInMainWorkspaceAsync(
TestLspServer
testLspServer, Uri fileUri)
217
private static Document? GetMiscellaneousDocument(
TestLspServer
testLspServer)
222
private static async Task<LSP.Hover> RunGetHoverAsync(
TestLspServer
testLspServer, LSP.Location caret)
OnAutoInsert\OnAutoInsertTests.cs (4)
389
Task<
TestLspServer
> testLspServerTask;
403
await using
var
testLspServer = await testLspServerTask;
419
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
429
TestLspServer
testLspServer,
Options\LspOptionsTests.cs (2)
36
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
50
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
Ordering\RequestOrderingTests.cs (13)
43
await using
var
testLspServer = await CreateTestLspServerAsync("class C { }");
60
await using
var
testLspServer = await CreateTestLspServerAsync("class C { }");
77
await using
var
testLspServer = await CreateTestLspServerAsync("class C { }");
97
await using
var
testLspServer = await CreateTestLspServerAsync("class C { }");
117
await using
var
testLspServer = await CreateTestLspServerAsync("class C { }");
140
await using
var
testLspServer = await CreateTestLspServerAsync("class C { }");
172
await using
var
testLspServer = await CreateTestLspServerAsync("class C { }");
190
await using
var
testLspServer = await CreateTestLspServerAsync("class C { {|caret:|} }");
230
await using
var
testLspServer = await CreateTestLspServerAsync("class C { {|caret:|} }");
243
private static async Task ExecuteDidOpen(
TestLspServer
testLspServer, Uri documentUri)
256
private static async Task<Solution?> GetLSPSolution(
TestLspServer
testLspServer, string methodName)
271
private static async Task<TestResponse[]> TestAsync(
TestLspServer
testLspServer, TestRequest[] requests)
285
private static List<Task<TestResponse?>> StartTestRun(
TestLspServer
testLspServer, TestRequest[] requests, CancellationToken cancellationToken = default)
ProjectContext\GetTextDocumentWithContextHandlerTests.cs (4)
32
await using
var
testLspServer = await CreateXmlTestLspServerAsync(workspaceXml);
58
await using
var
testLspServer = await CreateXmlTestLspServerAsync(workspaceXml);
82
await using
var
testLspServer = await CreateXmlTestLspServerAsync(workspaceXml);
102
internal static async Task<LSP.VSProjectContextList?> RunGetProjectContext(
TestLspServer
testLspServer, Uri uri)
References\FindAllReferencesHandlerFeaturesTests.cs (1)
49
await using
var
testLspServer = await CreateTestLspServerAsync(markup, new LSP.ClientCapabilities());
References\FindAllReferencesHandlerTests.cs (10)
50
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
86
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
136
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
179
await using
var
testLspServer = await CreateTestLspServerAsync(markups, new InitializationOptions { ClientCapabilities = CapabilitiesWithVSExtensions });
203
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
222
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
244
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
274
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
286
await using
var
testLspServer = await CreateTestLspServerAsync(markup, CapabilitiesWithVSExtensions);
304
internal static async Task<T[]> RunFindAllReferencesAsync<T>(
TestLspServer
testLspServer, LSP.Location caret, IProgress<object> progress = null)
References\FindImplementationsTests.cs (7)
39
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
68
await using
var
testLspServer = await CreateTestLspServerAsync(markups);
88
await using
var
testLspServer = await CreateTestLspServerAsync(string.Empty);
112
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
127
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
146
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
155
private static async Task<LSP.Location[]> RunFindImplementationAsync(
TestLspServer
testLspServer, LSP.Location caret)
Rename\RenameTests.cs (6)
40
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
63
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
96
await using
var
testLspServer = await CreateXmlTestLspServerAsync(workspaceXml);
142
await using
var
testLspServer = await CreateXmlTestLspServerAsync(workspaceXml);
165
await using
var
testLspServer = await CreateTestLspServerAsync(string.Empty);
198
private static async Task<WorkspaceEdit> RunRenameAsync(
TestLspServer
testLspServer, LSP.RenameParams renameParams)
SemanticTokens\AbstractSemanticTokensTests.cs (2)
28
private protected static async Task<LSP.SemanticTokens> RunGetSemanticTokensRangeAsync(
TestLspServer
testLspServer, LSP.Location caret, LSP.Range range)
51
private protected static async Task VerifyBasicInvariantsAndNoMultiLineTokens(
TestLspServer
testLspServer, int[] tokens)
SemanticTokens\SemanticTokensRangeTests.cs (8)
36
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
58
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
93
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
128
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
170
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
203
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
256
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
324
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
SignatureHelp\SignatureHelpTests.cs (2)
42
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
54
private static async Task<LSP.SignatureHelp?> RunGetSignatureHelpAsync(
TestLspServer
testLspServer, LSP.Location caret)
SpellCheck\SpellCheckTests.cs (19)
35
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
50
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
78
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
118
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
154
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
202
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
243
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
270
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
302
await using
var
testLspServer = await CreateTestLspServerAsync(new[] { markup1, markup2 });
336
await using
var
testLspServer = await CreateXmlTestLspServerAsync(workspaceXml);
375
await using
var
testLspServer = await CreateTestLspServerAsync(new[] { markup1, markup2 });
413
await using
var
testLspServer = await CreateTestLspServerAsync(new[] { markup1, markup2 });
449
await using
var
testLspServer = await CreateTestLspServerAsync(new[] { markup1, markup2 });
502
await using
var
testLspServer = await CreateTestLspServerAsync(new[] { markup1, markup2 });
549
private static Task OpenDocumentAsync(
TestLspServer
testLspServer, Document document)
552
private static Task CloseDocumentAsync(
TestLspServer
testLspServer, Document document)
556
TestLspServer
testLspServer,
579
TestLspServer
testLspServer,
600
TestLspServer
testLspServer,
Symbols\DocumentSymbolsTests.cs (5)
44
await using
var
testLspServer = await CreateTestLspServerAsync(markup, clientCapabilities);
65
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
89
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
97
await using
var
testLspServer = await CreateTestLspServerAsync(string.Empty);
103
private static async Task<TReturn> RunGetDocumentSymbolsAsync<TReturn>(
TestLspServer
testLspServer)
Symbols\WorkspaceSymbolsTests.cs (9)
38
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
58
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
84
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
107
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
132
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
164
await using
var
testLspServer = await CreateTestLspServerAsync(markups);
185
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
199
await using
var
testLspServer = await CreateVisualBasicTestLspServerAsync(markup);
209
private static Task<LSP.SymbolInformation[]?> RunGetWorkspaceSymbolsAsync(
TestLspServer
testLspServer, string query, IProgress<LSP.SymbolInformation[]>? progress = null)
ValidateBreakableRange\ValidateBreakableRangeTests.cs (11)
34
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
57
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
78
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
97
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
118
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
140
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
163
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
190
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
213
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
235
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
245
private static async Task<LSP.Range?> RunAsync(
TestLspServer
testLspServer, LSP.Location caret)
VSTypeScriptHandlerTests.cs (4)
47
await using
var
testLspServer = await CreateTsTestLspServerAsync(workspaceXml);
71
await using
var
testLspServer = await CreateTsTestLspServerAsync(workspaceXml, options);
83
private async Task<
TestLspServer
> CreateTsTestLspServerAsync(string workspaceXml, InitializationOptions? options = null)
94
return await
TestLspServer
.CreateAsync(testWorkspace, new ClientCapabilities(), languageServerTarget, clientStream);
Workspaces\LspWorkspaceManagerTests.cs (20)
32
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
59
await using
var
testLspServer = await CreateTestLspServerAsync(new string[] { markupOne, markupTwo });
98
await using
var
testLspServer = await CreateTestLspServerAsync(new string[] { markupOne, markupTwo });
126
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
150
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
174
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
199
await using
var
testLspServer = await CreateTestLspServerAsync(markup, new InitializationOptions { ServerKind = WellKnownLspServerKinds.CSharpVisualBasicLspServer });
253
await using
var
testLspServer = await CreateXmlTestLspServerAsync(firstWorkspaceXml);
289
await using
var
testLspServer = await CreateXmlTestLspServerAsync(firstWorkspaceXml, workspaceKind: WorkspaceKind.MiscellaneousFiles);
320
await using
var
testLspServer = await CreateXmlTestLspServerAsync(firstWorkspaceXml);
379
await using
var
testLspServer = await CreateXmlTestLspServerAsync(firstWorkspaceXml);
435
await using
var
testLspServerOne = await
TestLspServer
.CreateAsync(testWorkspace, new InitializationOptions(), TestOutputLspLogger);
436
await using
var
testLspServerTwo = await
TestLspServer
.CreateAsync(testWorkspace, new InitializationOptions(), TestOutputLspLogger);
469
await using
var
testLspServer = await CreateTestLspServerAsync(markup);
484
private static async Task<Document> OpenDocumentAndVerifyLspTextAsync(Uri documentUri,
TestLspServer
testLspServer, string openText = "LSP text")
495
private static bool IsWorkspaceRegistered(Workspace workspace,
TestLspServer
testLspServer)
500
private static async Task<(Workspace? workspace, Document? document)> GetLspWorkspaceAndDocumentAsync(Uri uri,
TestLspServer
testLspServer)
506
private static Task<(Workspace?, Solution?)> GetLspHostWorkspaceAndSolutionAsync(
TestLspServer
testLspServer)
Workspaces\LspWorkspaceRegistrationServiceTests.cs (1)
27
await using (
var
testLspServer = await CreateTestLspServerAsync(markup))
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
DocumentOutline\DocumentOutlineTestsBase.cs (3)
96
var
testLspServer = await CreateTestLspServerAsync(workspace, new InitializationOptions { ClientCapabilities = clientCapabilities });
115
private async Task<
TestLspServer
> CreateTestLspServerAsync(TestWorkspace workspace, InitializationOptions initializationOptions)
146
return await
TestLspServer
.CreateAsync(workspace, initializationOptions, _logger);
Microsoft.VisualStudio.LanguageServices.LiveShare.UnitTests (1)
ProjectsHandlerTests.cs (1)
25
await using
var
testLspServer = await CreateTestLspServerAsync(string.Empty);