summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
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"));
+ }
+}