Add buildpack CA test no cf connection
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user