Initial harness for conditionals live hover tests

This commit is contained in:
nsingh
2017-10-22 20:52:56 -07:00
parent a50d7f1791
commit 7742083562
2 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
/*******************************************************************************
* Copyright (c) 2017 Pivotal, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Pivotal, Inc. - initial API and implementation
*******************************************************************************/
package org.springframework.ide.vscode.boot.java.conditionals.test;
import org.junit.Before;
import org.springframework.ide.vscode.boot.java.BootJavaLanguageServer;
import org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness;
import org.springframework.ide.vscode.project.harness.BootLanguageServerHarness;
import org.springframework.ide.vscode.project.harness.MockRunningAppProvider;
public class ConditionalsLiveHoverTest {
private LanguageServerHarness<BootJavaLanguageServer> harness;
private MockRunningAppProvider mockAppProvider;
@Before
public void setup() throws Exception {
mockAppProvider = new MockRunningAppProvider();
harness = BootLanguageServerHarness.builder()
.runningAppProvider(mockAppProvider.provider)
.build();
}
}

View File

@@ -105,6 +105,11 @@ public class MockRunningAppProvider {
return this;
}
public MockAppBuilder getAutoConfigReport(String autoConfigReport) throws Exception {
when(app.getAutoConfigReport()).thenReturn(autoConfigReport);
return this;
}
/**
* Builds the mock app and adds it to the app provider
*/