diff --git a/headless-services/spring-boot-language-server/src/test/java/org/springframework/ide/vscode/project/harness/MockRunningAppProvider.java b/headless-services/spring-boot-language-server/src/test/java/org/springframework/ide/vscode/project/harness/MockRunningAppProvider.java index 87b19288b..f387a90d7 100644 --- a/headless-services/spring-boot-language-server/src/test/java/org/springframework/ide/vscode/project/harness/MockRunningAppProvider.java +++ b/headless-services/spring-boot-language-server/src/test/java/org/springframework/ide/vscode/project/harness/MockRunningAppProvider.java @@ -22,6 +22,7 @@ import org.springframework.ide.vscode.commons.boot.app.cli.ContextPath; import org.springframework.ide.vscode.commons.boot.app.cli.LocalSpringBootApp; import org.springframework.ide.vscode.commons.boot.app.cli.SpringBootApp; import org.springframework.ide.vscode.commons.boot.app.cli.livebean.LiveBeansModel; +import org.springframework.ide.vscode.commons.boot.app.cli.liveproperties.LivePropertiesJsonParser; import org.springframework.ide.vscode.commons.boot.app.cli.requestmappings.RequestMapping; import org.springframework.ide.vscode.commons.util.ExceptionUtil; @@ -129,6 +130,11 @@ public class MockRunningAppProvider { return this; } + public MockAppBuilder livePropertiesJson(String envJson) throws Exception{ + when(app.getLiveProperties()).thenReturn(LivePropertiesJsonParser.parseProperties(envJson)); + return this; + } + public MockAppBuilder profiles(String... names) { when(app.getActiveProfiles()).thenReturn(ImmutableList.copyOf(names)); return this;