Esempio n. 1
0
        private static void AssertServerCapabilities(LSP.ServerCapabilities actual)
        {
            Assert.True(actual.DefinitionProvider);
            Assert.True(actual.ImplementationProvider);
            Assert.True(actual.DocumentSymbolProvider);
            Assert.True(actual.WorkspaceSymbolProvider);
            Assert.True(actual.DocumentFormattingProvider);
            Assert.True(actual.DocumentRangeFormattingProvider);
            Assert.True(actual.DocumentHighlightProvider);

            Assert.True(actual.CompletionProvider.ResolveProvider);
            Assert.Equal(new[] { "." }, actual.CompletionProvider.TriggerCharacters);

            Assert.Equal(new[] { "(", "," }, actual.SignatureHelpProvider.TriggerCharacters);

            Assert.Equal("}", actual.DocumentOnTypeFormattingProvider.FirstTriggerCharacter);
            Assert.Equal(new[] { ";", "\n" }, actual.DocumentOnTypeFormattingProvider.MoreTriggerCharacter);
        }
Esempio n. 2
0
        private static void AssertServerCapabilities(LSP.ServerCapabilities actual)
        {
            Assert.True(actual.DefinitionProvider);
            Assert.True(actual.ImplementationProvider);
            Assert.True(actual.DocumentSymbolProvider);
            Assert.True(actual.WorkspaceSymbolProvider);
            Assert.True((bool)actual.DocumentFormattingProvider.Value);
            Assert.True((bool)actual.DocumentRangeFormattingProvider.Value);
            Assert.True(actual.DocumentHighlightProvider);

            Assert.True(actual.CompletionProvider.ResolveProvider);
            Assert.Equal(new[] { ".", " ", "#", "<", ">", "\"", ":", "[", "(", "~", "=", "{", "/" }.OrderBy(string.Compare),
                         actual.CompletionProvider.TriggerCharacters.OrderBy(string.Compare));

            Assert.Equal(new[] { "(", "," }, actual.SignatureHelpProvider.TriggerCharacters);

            Assert.Equal("}", actual.DocumentOnTypeFormattingProvider.FirstTriggerCharacter);
            Assert.Equal(new[] { ";", "\n" }, actual.DocumentOnTypeFormattingProvider.MoreTriggerCharacter);
        }