Open dibarbet opened 3 years ago
I was under the erroneous assumption that normal completion tests use editor commit behavior. But it looks like we just 'fake' it ourselves - http://sourceroslyn.io/#Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities/Completion/AbstractCompletionProviderTests.cs,565
I think what should happen at least for these, is to mirror this, but instead of calling completion apis, we call LSP (and fake LSP commit as well). Then we can have two paths and run all the tests through both.
Currently, all the LSP unit tests validate the json payload that is expected to be returned from the server, e.g. http://sourceroslyn.io/#Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests/Completion/CompletionTests.cs,41
We should instead figure out a way to have the unit tests run through an LSP client to validate the actual behavior when we return our response.
For the test client we'd need to be able to
We may be able to re-use the VS LSP client library, but we'd need to figure out a way to setup the infrastructure it requires to run (e.g. text views, content types, etc)