Search in sources :

Example 1 with LanguageServerHarness

use of org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness in project sts4 by spring-projects.

the class BoshLanguageServerTest method createAndInitializeServerWithWorkspace.

@Test
public void createAndInitializeServerWithWorkspace() throws Exception {
    LanguageServerHarness harness = new LanguageServerHarness(() -> new BoshLanguageServer(cliConfig, new MockCloudConfigProvider(cliConfig), mock(DynamicModelProvider.class), mock(DynamicModelProvider.class)));
    File workspaceRoot = getTestResource("/workspace/");
    assertExpectedInitResult(harness.intialize(workspaceRoot));
}
Also used : LanguageServerHarness(org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness) MockCloudConfigProvider(org.springframework.ide.vscode.bosh.mocks.MockCloudConfigProvider) File(java.io.File) Test(org.junit.Test)

Example 2 with LanguageServerHarness

use of org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness in project sts4 by spring-projects.

the class ManifestYamlEditorTest method setup.

@Before
public void setup() throws Exception {
    harness = new LanguageServerHarness(() -> new ManifestYamlLanguageServer(cloudfoundry.factory, cloudfoundry.defaultParamsProvider), LanguageId.CF_MANIFEST);
    harness.intialize(null);
    System.setProperty("lsp.yaml.completions.errors.disable", "false");
}
Also used : LanguageServerHarness(org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness) Before(org.junit.Before)

Example 3 with LanguageServerHarness

use of org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness in project sts4 by spring-projects.

the class ManifestYamlLanguageServerTest method createAndInitializeServerWithoutWorkspace.

@Test
public void createAndInitializeServerWithoutWorkspace() throws Exception {
    File workspaceRoot = null;
    LanguageServerHarness harness = new LanguageServerHarness(ManifestYamlLanguageServer::new);
    assertExpectedInitResult(harness.intialize(workspaceRoot));
}
Also used : LanguageServerHarness(org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness) File(java.io.File) Test(org.junit.Test)

Example 4 with LanguageServerHarness

use of org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness in project sts4 by spring-projects.

the class AbstractPropsEditorTest method setup.

@Before
public void setup() throws Exception {
    md = new PropertyIndexHarness();
    harness = new LanguageServerHarness(this::newLanguageServer) {

        @Override
        protected LanguageId getDefaultLanguageId() {
            return AbstractPropsEditorTest.this.getLanguageId();
        }

        protected String getFileExtension() {
            return AbstractPropsEditorTest.this.getFileExtension();
        }
    };
    harness.intialize(null);
}
Also used : LanguageServerHarness(org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness) LanguageId(org.springframework.ide.vscode.commons.util.text.LanguageId) Before(org.junit.Before)

Example 5 with LanguageServerHarness

use of org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness in project sts4 by spring-projects.

the class BoshLanguageServerTest method createAndInitializeServerWithoutWorkspace.

@Test
public void createAndInitializeServerWithoutWorkspace() throws Exception {
    File workspaceRoot = null;
    LanguageServerHarness harness = new LanguageServerHarness(() -> new BoshLanguageServer(cliConfig, new MockCloudConfigProvider(cliConfig), mock(DynamicModelProvider.class), mock(DynamicModelProvider.class)));
    assertExpectedInitResult(harness.intialize(workspaceRoot));
}
Also used : LanguageServerHarness(org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness) File(java.io.File) MockCloudConfigProvider(org.springframework.ide.vscode.bosh.mocks.MockCloudConfigProvider) Test(org.junit.Test)

Aggregations

LanguageServerHarness (org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness)10 Test (org.junit.Test)8 File (java.io.File)6 Before (org.junit.Before)2 MockCloudConfigProvider (org.springframework.ide.vscode.bosh.mocks.MockCloudConfigProvider)2 ConcourseLanguageServer (org.springframework.ide.vscode.concourse.ConcourseLanguageServer)2 JsonParser (com.google.gson.JsonParser)1 InputStreamReader (java.io.InputStreamReader)1 DidChangeConfigurationParams (org.eclipse.lsp4j.DidChangeConfigurationParams)1 LanguageId (org.springframework.ide.vscode.commons.util.text.LanguageId)1 Editor (org.springframework.ide.vscode.languageserver.testharness.Editor)1