diff options
author | George Fraser <george@fivetran.com> | 2018-09-23 14:20:04 -0700 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2018-09-23 14:20:04 -0700 |
commit | d77f1ab606a98dadf4fcc6640e5a575e2187b9e1 (patch) | |
tree | 6596627d2a61dd46a4d2c6ce996164c730adf0ab /src/test | |
parent | 4b3066ec501c20972152a0f4be24ea53c069ebc5 (diff) | |
download | java-language-server-d77f1ab606a98dadf4fcc6640e5a575e2187b9e1.zip |
Fix test fixture
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/javacs/LanguageServerFixture.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/test/java/org/javacs/LanguageServerFixture.java b/src/test/java/org/javacs/LanguageServerFixture.java index 94ba764..514ab74 100644 --- a/src/test/java/org/javacs/LanguageServerFixture.java +++ b/src/test/java/org/javacs/LanguageServerFixture.java @@ -11,7 +11,6 @@ import org.eclipse.lsp4j.MessageActionItem; import org.eclipse.lsp4j.MessageParams; import org.eclipse.lsp4j.PublishDiagnosticsParams; import org.eclipse.lsp4j.ShowMessageRequestParams; -import org.eclipse.lsp4j.services.LanguageClient; class LanguageServerFixture { @@ -28,7 +27,7 @@ class LanguageServerFixture { static JavaLanguageServer getJavaLanguageServer(Path workspaceRoot, Consumer<Diagnostic> onError) { return getJavaLanguageServer( workspaceRoot, - new LanguageClient() { + new CustomLanguageClient() { @Override public void telemetryEvent(Object o) {} @@ -48,17 +47,27 @@ class LanguageServerFixture { @Override public void logMessage(MessageParams messageParams) {} + + @Override + public void javaStartProgress(JavaStartProgressParams params) {} + + @Override + public void javaReportProgress(JavaReportProgressParams params) {} + + @Override + public void javaEndProgress() {} }); } - private static JavaLanguageServer getJavaLanguageServer(Path workspaceRoot, LanguageClient client) { + private static JavaLanguageServer getJavaLanguageServer(Path workspaceRoot, CustomLanguageClient client) { var server = new JavaLanguageServer(); var init = new InitializeParams(); init.setRootUri(workspaceRoot.toUri().toString()); - server.initialize(init); server.installClient(client); + server.initialize(init); + server.initialized(null); return server; } |