diff options
author | George Fraser <george@fivetran.com> | 2019-04-01 19:31:33 -0700 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2019-04-01 19:31:33 -0700 |
commit | 525b9cf04a32540bf70928da767dd6d4d7dbb5ef (patch) | |
tree | 8996f69496484edf0bc5174f5e45ff46bea25098 /src/test | |
parent | 484fa8f8ed2e460bb8e100d7587a8f3e1e661bfd (diff) | |
download | java-language-server-525b9cf04a32540bf70928da767dd6d4d7dbb5ef.zip |
Don't include outputs in classpath
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/javacs/InferBazelConfigTest.java | 9 | ||||
-rw-r--r-- | src/test/java/org/javacs/InferConfigTest.java | 13 |
2 files changed, 5 insertions, 17 deletions
diff --git a/src/test/java/org/javacs/InferBazelConfigTest.java b/src/test/java/org/javacs/InferBazelConfigTest.java index f5dcd80..b652d19 100644 --- a/src/test/java/org/javacs/InferBazelConfigTest.java +++ b/src/test/java/org/javacs/InferBazelConfigTest.java @@ -49,14 +49,9 @@ public class InferBazelConfigTest { } @Test - public void bazelWorkspaceClassPath() { - assertThat(bazel.workspaceClassPath(), hasItem(bazelBinTarget.resolve("module/_javac/main/libmain_classes"))); - } - - @Test - public void bazelBuildClassPath() { + public void bazelClassPath() { assertThat( - bazel.buildClassPath(), + bazel.classPath(), hasItem( bazelGenfilesTarget.resolve( "external/com_external_external_library/jar/_ijar/jar/external/com_external_external_library/jar/external-library-1.2.jar"))); diff --git a/src/test/java/org/javacs/InferConfigTest.java b/src/test/java/org/javacs/InferConfigTest.java index d49ebb8..ac660d0 100644 --- a/src/test/java/org/javacs/InferConfigTest.java +++ b/src/test/java/org/javacs/InferConfigTest.java @@ -5,7 +5,6 @@ import static org.junit.Assert.*; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.Collections; import java.util.Set; import org.junit.Test; @@ -16,18 +15,12 @@ public class InferConfigTest { private Set<String> externalDependencies = Set.of("com.external:external-library:1.2"); private InferConfig both = new InferConfig(workspaceRoot, externalDependencies, mavenHome, gradleHome); private InferConfig gradle = new InferConfig(workspaceRoot, externalDependencies, Paths.get("nowhere"), gradleHome); - private InferConfig onlyPomXml = - new InferConfig( - Paths.get("src/test/test-project/only-pom-xml"), - Collections.emptySet(), - mavenHome, - Paths.get("nowhere")); private InferConfig thisProject = new InferConfig(Paths.get("."), Set.of()); @Test public void mavenClassPath() { assertThat( - both.buildClassPath(), + both.classPath(), contains(mavenHome.resolve("repository/com/external/external-library/1.2/external-library-1.2.jar"))); // v1.1 should be ignored } @@ -35,7 +28,7 @@ public class InferConfigTest { @Test public void gradleClasspath() { assertThat( - gradle.buildClassPath(), + gradle.classPath(), contains( gradleHome.resolve( "caches/modules-2/files-2.1/com.external/external-library/1.2/xxx/external-library-1.2.jar"))); @@ -70,7 +63,7 @@ public class InferConfigTest { @Test public void thisProjectClassPath() { assertThat( - thisProject.buildClassPath(), + thisProject.classPath(), hasItem(hasToString(endsWith(".m2/repository/junit/junit/4.12/junit-4.12.jar")))); } |