Add buildpack CA test no cf connection

This commit is contained in:
BoykoAlex
2017-05-04 20:06:43 -04:00
parent 3d8d7ca119
commit 8d66c09a35

View File

@@ -1234,6 +1234,23 @@ public class ManifestYamlEditorTest {
assertEquals("an-org : a-space [test.io]", completion.getDocumentation());
}
@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.paramsProvider.getParams()).thenThrow(new NoTargetsException(title + ": " + description));
CompletionItem completion = assertCompletions("buildpack: <*>", "buildpack: <*>").get(0);
assertEquals(title, completion.getLabel());
assertEquals(description, completion.getDocumentation());
}
@Test
public void domainContentAssist() throws Exception {
ClientRequests cfClient = cloudfoundry.client;