diff options
author | George Fraser <george@fivetran.com> | 2018-06-24 15:44:58 -0700 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2018-06-24 15:44:58 -0700 |
commit | 0da93b742ce80802306e02d845d390ea29b4a6fa (patch) | |
tree | 546013f67b3b6a3634cc5f8b05ed018bc7c9b5bb /src/test | |
parent | 5d81074a70670584f4d6d9cf0accaec09ebab7f3 (diff) | |
download | java-language-server-0da93b742ce80802306e02d845d390ea29b4a6fa.zip |
Fix-imports functions
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/javacs/FixImportsTest.java | 19 |
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")); + } +} |