use of org.springframework.ide.vscode.commons.languageserver.util.Settings in project sts4 by spring-projects.
the class BoshCommandStemcellsProviderTest method obeysCliConfigTarget.
@Test
public void obeysCliConfigTarget() throws Exception {
JsonElement settings = settings(ImmutableMap.of("bosh", ImmutableMap.of("cli", ImmutableMap.of("command", "alternate-command", "target", "explicit-target"))));
cliConfig.handleConfigurationChange(new Settings(settings));
assertEquals(ImmutableList.of(new StemcellData("bosh-vsphere-esxi-centos-7-go_agent", "3421.11", "centos-7"), new StemcellData("bosh-vsphere-esxi-ubuntu-trusty-go_agent", "3421.11", "ubuntu-trusty")), provider.getModel(mock(DynamicSchemaContext.class)).getStemcells());
verify(provider).executeCommand(eq(new ExternalCommand("alternate-command", "-e", "explicit-target", "stemcells", "--json")));
}
use of org.springframework.ide.vscode.commons.languageserver.util.Settings in project sts4 by spring-projects.
the class BoshCommandStemcellsProviderTest method obeysCliConfigCommandAndTarget.
// @Test public void defaultCliConfig() throws Exception {
// assertEquals(ImmutableList.of(
// new StemcellData("bosh-vsphere-esxi-centos-7-go_agent", "3421.11", "centos-7"),
// new StemcellData("bosh-vsphere-esxi-ubuntu-trusty-go_agent", "3421.11", "ubuntu-trusty")
// ),
// provider.getModel(mock(DynamicSchemaContext.class)).getStemcells()
// );
// verify(provider).executeCommand(eq(new ExternalCommand("bosh", "stemcells", "--json")));
// }
@Test
public void obeysCliConfigCommandAndTarget() throws Exception {
JsonElement settings = settings(ImmutableMap.of("bosh", ImmutableMap.of("cli", ImmutableMap.of("command", "alternate-command", "target", "some-target"))));
cliConfig.handleConfigurationChange(new Settings(settings));
assertEquals(ImmutableList.of(new StemcellData("bosh-vsphere-esxi-centos-7-go_agent", "3421.11", "centos-7"), new StemcellData("bosh-vsphere-esxi-ubuntu-trusty-go_agent", "3421.11", "ubuntu-trusty")), provider.getModel(mock(DynamicSchemaContext.class)).getStemcells());
verify(provider).executeCommand(eq(new ExternalCommand("alternate-command", "-e", "some-target", "stemcells", "--json")));
}
Aggregations