Search in sources :

Example 1 with MockCloudConfigProvider

use of org.springframework.ide.vscode.bosh.mocks.MockCloudConfigProvider 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 MockCloudConfigProvider

use of org.springframework.ide.vscode.bosh.mocks.MockCloudConfigProvider 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

File (java.io.File)2 Test (org.junit.Test)2 MockCloudConfigProvider (org.springframework.ide.vscode.bosh.mocks.MockCloudConfigProvider)2 LanguageServerHarness (org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness)2