summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2019-01-08 20:29:20 -0800
committerGeorge Fraser <george@fivetran.com>2019-01-08 20:29:20 -0800
commit938fce4f8d2630d456caea03b0c178508680e945 (patch)
tree393084404c94156fd549c2c7e1aaf2a79eaa8eea /src/test
parenta8d28f51dfc42c88eddbe1b5156f5b1be5aece83 (diff)
downloadjava-language-server-938fce4f8d2630d456caea03b0c178508680e945.zip
Use SourceFileManager from docs
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/javacs/DocsTest.java7
-rw-r--r--src/test/java/org/javacs/LanguageServerFixture.java1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/test/java/org/javacs/DocsTest.java b/src/test/java/org/javacs/DocsTest.java
index 6819974..eb764be 100644
--- a/src/test/java/org/javacs/DocsTest.java
+++ b/src/test/java/org/javacs/DocsTest.java
@@ -4,9 +4,16 @@ import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import java.util.Set;
+import org.junit.Before;
import org.junit.Test;
public class DocsTest {
+
+ @Before
+ public void setWorkspaceRoot() {
+ FileStore.setWorkspaceRoots(Set.of(LanguageServerFixture.SIMPLE_WORKSPACE_ROOT));
+ }
+
@Test
public void classDoc() {
var sourcePath = Set.of(JavaCompilerServiceTest.simpleProjectSrc());
diff --git a/src/test/java/org/javacs/LanguageServerFixture.java b/src/test/java/org/javacs/LanguageServerFixture.java
index f9052a0..20772ee 100644
--- a/src/test/java/org/javacs/LanguageServerFixture.java
+++ b/src/test/java/org/javacs/LanguageServerFixture.java
@@ -10,6 +10,7 @@ import org.javacs.lsp.*;
class LanguageServerFixture {
public static Path DEFAULT_WORKSPACE_ROOT = Paths.get("src/test/test-project/workspace").normalize();
+ public static Path SIMPLE_WORKSPACE_ROOT = Paths.get("src/test/test-project/simple").normalize();
static {
Main.setRootFormat();