diff options
author | George Fraser <george@fivetran.com> | 2019-01-08 19:22:45 -0800 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2019-01-08 19:22:45 -0800 |
commit | 727bd8341afc689c842385a234647b8f7b22de21 (patch) | |
tree | 73230e098d2a6e72fc72901f4363b46530433f15 /src/test/java/org/javacs/JavaCompilerServiceTest.java | |
parent | 46e72551e73f1de2417102fd3d7fbc358a42cfa6 (diff) | |
download | java-language-server-727bd8341afc689c842385a234647b8f7b22de21.zip |
Eliminate SourcePath, docpath isn't quite working
Diffstat (limited to 'src/test/java/org/javacs/JavaCompilerServiceTest.java')
-rw-r--r-- | src/test/java/org/javacs/JavaCompilerServiceTest.java | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/test/java/org/javacs/JavaCompilerServiceTest.java b/src/test/java/org/javacs/JavaCompilerServiceTest.java index a0618da..dde1569 100644 --- a/src/test/java/org/javacs/JavaCompilerServiceTest.java +++ b/src/test/java/org/javacs/JavaCompilerServiceTest.java @@ -11,7 +11,6 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.Set; import java.util.StringJoiner; import java.util.stream.Collectors; import javax.lang.model.element.Element; @@ -25,31 +24,12 @@ public class JavaCompilerServiceTest { Main.setRootFormat(); } - private JavaCompilerService compiler = - new JavaCompilerService( - Collections.singleton(simpleProjectSrc()), - JavaCompilerServiceTest::allJavaFiles, - Collections.emptySet(), - Collections.emptySet()); - - static Path mavenProjectSrc() { - return Paths.get("src/test/test-project/workspace/src").normalize(); - } + private JavaCompilerService compiler = new JavaCompilerService(Collections.emptySet(), Collections.emptySet()); static Path simpleProjectSrc() { return Paths.get("src/test/test-project/simple").normalize(); } - static Set<Path> allJavaFiles() { - try { - return Files.walk(simpleProjectSrc()) - .filter(f -> f.getFileName().toString().endsWith(".java")) - .collect(Collectors.toSet()); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - static String contents(String resourceFile) { var root = JavaCompilerServiceTest.simpleProjectSrc(); var file = root.resolve(resourceFile); @@ -302,17 +282,4 @@ public class JavaCompilerServiceTest { assertTrue(CompileFocus.matchesPartialName("foobar", "foo")); assertFalse(CompileFocus.matchesPartialName("foo", "foobar")); } - - @Test - public void packageName() { - var compiler = - new JavaCompilerService( - Collections.singleton(mavenProjectSrc()), - JavaCompilerServiceTest::allJavaFiles, - Collections.emptySet(), - Collections.emptySet()); - assertThat( - compiler.pathBasedPackageName(FindResource.path("/org/javacs/example/Goto.java")), - equalTo("org.javacs.example")); - } } |