Add test cases for situations where cloud config is unavailable

This commit is contained in:
Kris De Volder
2017-07-19 12:52:38 -07:00
parent d15dae1c0c
commit 9aa5ed36bb
2 changed files with 51 additions and 2 deletions

View File

@@ -326,7 +326,7 @@ public class Editor {
return completions;
}
public void assertCompletionLabels(String... expectedLabels) throws Exception {
public List<CompletionItem> assertCompletionLabels(String... expectedLabels) throws Exception {
StringBuilder expect = new StringBuilder();
StringBuilder actual = new StringBuilder();
for (String label : expectedLabels) {
@@ -334,11 +334,13 @@ public class Editor {
expect.append("\n");
}
for (CompletionItem completion : getCompletions()) {
List<CompletionItem> completions;
for (CompletionItem completion : completions = getCompletions()) {
actual.append(completion.getLabel());
actual.append("\n");
}
assertEquals(expect.toString(), actual.toString());
return completions;
}
public void assertContainsCompletions(String... expectTextAfter) throws Exception {