/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/LanguageServer/ProtocolUnitTests/InlayHint/VisualBasicInlayHintTests.cs
65 строк
2 KB
David Barbet
Refactor LSP server logging to remove singleton lsp instance (#84001)
16 июн 2026, 05:04
Не верифицирован
16 июн 2026, 05:04
82e81e5
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Threading.Tasks; using Microsoft.CodeAnalysis.InlineHints; using Roslyn.LanguageServer.Protocol; using Xunit; using Xunit.Abstractions; using LSP = Roslyn.LanguageServer.Protocol; namespace Microsoft.CodeAnalysis.LanguageServer.UnitTests.InlayHint; public sealed class VisualBasicInlayHintTests : AbstractInlayHintTests { public VisualBasicInlayHintTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } [Theory, CombinatorialData] public Task TestOneInlayParameterHintAsync(bool mutatingLspWorkspace) => RunVerifyInlayHintAsync(""" Class A Sub M(x As Integer) End Sub Sub M2() M({|x:|}5) End Sub End Class """, mutatingLspWorkspace); [Theory, CombinatorialData] public Task TestMultipleInlayParameterHintsAsync(bool mutatingLspWorkspace) => RunVerifyInlayHintAsync(""" Class A Sub M(x As Integer, y As Boolean) End Sub Sub M2() M({|x:|}5, {|y:|}True) End Sub End Class """, mutatingLspWorkspace); private async Task RunVerifyInlayHintAsync(string markup, bool mutatingLspWorkspace) { await using var testLspServer = await CreateVisualBasicTestLspServerAsync(markup, mutatingLspWorkspace, new InitializationOptions { ClientCapabilities = new LSP.VSInternalClientCapabilities { SupportsVisualStudioExtensions = true, Workspace = new WorkspaceClientCapabilities { InlayHint = new InlayHintWorkspaceSetting { RefreshSupport = true } } } }); testLspServer.TestWorkspace.GlobalOptions.SetGlobalOption(InlineHintsOptionsStorage.EnabledForParameters, LanguageNames.VisualBasic, true); await VerifyInlayHintAsync(testLspServer); } }