summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2018-06-24 15:44:58 -0700
committerGeorge Fraser <george@fivetran.com>2018-06-24 15:44:58 -0700
commit0da93b742ce80802306e02d845d390ea29b4a6fa (patch)
tree546013f67b3b6a3634cc5f8b05ed018bc7c9b5bb /src/test
parent5d81074a70670584f4d6d9cf0accaec09ebab7f3 (diff)
downloadjava-language-server-0da93b742ce80802306e02d845d390ea29b4a6fa.zip
Fix-imports functions
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/javacs/FixImportsTest.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/java/org/javacs/FixImportsTest.java b/src/test/java/org/javacs/FixImportsTest.java
new file mode 100644
index 0000000..4b77087
--- /dev/null
+++ b/src/test/java/org/javacs/FixImportsTest.java
@@ -0,0 +1,19 @@
+package org.javacs;
+
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+import java.util.*;
+import org.junit.Test;
+
+public class FixImportsTest {
+ FixImports fix = new FixImports(new ClassPathIndex(Collections.emptySet()));
+ FixImports.ExistingImports emptyImports =
+ new FixImports.ExistingImports(Collections.emptySet(), Collections.emptySet());
+
+ @Test
+ public void findJavaUtilList() {
+ Map<String, String> resolved = fix.resolveSymbols(Collections.singleton("List"), emptyImports);
+ assertThat(resolved, hasEntry("List", "java.util.List"));
+ }
+}