diff options
author | George Fraser <george@fivetran.com> | 2018-12-27 14:24:24 -0800 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2018-12-27 14:24:24 -0800 |
commit | 84982255bbcf53bec86e31b6cd4f7282169ccc5d (patch) | |
tree | a79362475400e039228ecb06ab3a415f0f23e86a /src/test/java | |
parent | 5b2339d7a7a33edd7fe6390181b2e26e167e3c92 (diff) | |
download | java-language-server-84982255bbcf53bec86e31b6cd4f7282169ccc5d.zip |
Fix enum completions, cache hovers
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/org/javacs/CompletionsTest.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/java/org/javacs/CompletionsTest.java b/src/test/java/org/javacs/CompletionsTest.java index 569a620..1a8171d 100644 --- a/src/test/java/org/javacs/CompletionsTest.java +++ b/src/test/java/org/javacs/CompletionsTest.java @@ -667,14 +667,22 @@ public class CompletionsTest extends CompletionsBase { } @Test - public void switchCase() { + public void enumConstantFromSourcePath() { var file = "/org/javacs/example/AutocompleteCase.java"; - var suggestions = insertText(file, 8, 18); + var suggestions = insertText(file, 6, 18); assertThat("suggests enum options", suggestions, containsInAnyOrder("Foo", "Bar")); } @Test + public void enumConstantFromClassPath() { + var file = "/org/javacs/example/AutocompleteCaseFromClassPath.java"; + var suggestions = insertText(file, 8, 18); + + assertThat("suggests enum options", suggestions, containsInAnyOrder("FULL", "LONG", "MEDIUM", "SHORT")); + } + + @Test public void staticStarImport() { var file = "/org/javacs/example/AutocompleteStaticImport.java"; var suggestions = insertText(file, 9, 15); |