use of org.springframework.ide.vscode.commons.cloudfoundry.client.CFBuildpack in project sts4 by spring-projects.
the class ManifestYamlActualCfClientTest method testGetBuildpacks.
@Ignore
@Test
public void testGetBuildpacks() throws Exception {
List<CFTarget> targets = cfTargetCache.getOrCreate();
assertTrue(targets.size() == 1);
CFTarget target = targets.get(0);
List<CFBuildpack> buildpacks = target.getBuildpacks();
assertTrue(!buildpacks.isEmpty());
}
use of org.springframework.ide.vscode.commons.cloudfoundry.client.CFBuildpack in project sts4 by spring-projects.
the class ManifestYamlEditorTest method buildbackContentAssistNoTargets.
@Test
public void buildbackContentAssistNoTargets() throws Exception {
ClientRequests cfClient = cloudfoundry.client;
CFBuildpack buildPack = Mockito.mock(CFBuildpack.class);
when(buildPack.getName()).thenReturn("java_buildpack");
when(cfClient.getBuildpacks()).thenReturn(ImmutableList.of(buildPack));
String title = "No targets";
String description = "Use CLI to login";
when(cloudfoundry.defaultParamsProvider.getParams()).thenThrow(new NoTargetsException(title + ": " + description));
CompletionItem completion = assertCompletions("buildpack: <*>", "buildpack: <*>").get(0);
assertEquals(title, completion.getLabel());
assertEquals(description, completion.getDocumentation());
}
use of org.springframework.ide.vscode.commons.cloudfoundry.client.CFBuildpack in project sts4 by spring-projects.
the class ManifestYamlEditorTest method buildpackContentAssist.
@Test
public void buildpackContentAssist() throws Exception {
ClientRequests cfClient = cloudfoundry.client;
CFBuildpack buildPack = Mockito.mock(CFBuildpack.class);
when(buildPack.getName()).thenReturn("java_buildpack");
when(cfClient.getBuildpacks()).thenReturn(ImmutableList.of(buildPack));
CompletionItem completion = assertCompletions("buildpack: <*>", "buildpack: java_buildpack<*>").get(0);
assertEquals("java_buildpack", completion.getLabel());
assertEquals("an-org : a-space [test.io]", completion.getDocumentation());
}
Aggregations