From a18959b8ac558f8cd054b6a6f0efa6daf4e3f181 Mon Sep 17 00:00:00 2001 From: Marcin Abramowicz <44381959+abrams27@users.noreply.github.com> Date: Fri, 27 Jan 2023 17:49:01 +0100 Subject: [PATCH] [maintenance] tests are even greener (#326) --- .../BazelPathSpecMapperTest.kt | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/executioncontext/workspacecontext/src/test/java/org/jetbrains/bsp/bazel/workspacecontext/BazelPathSpecMapperTest.kt b/executioncontext/workspacecontext/src/test/java/org/jetbrains/bsp/bazel/workspacecontext/BazelPathSpecMapperTest.kt index d3dd2907c..d0bb0dfcb 100644 --- a/executioncontext/workspacecontext/src/test/java/org/jetbrains/bsp/bazel/workspacecontext/BazelPathSpecMapperTest.kt +++ b/executioncontext/workspacecontext/src/test/java/org/jetbrains/bsp/bazel/workspacecontext/BazelPathSpecMapperTest.kt @@ -10,29 +10,29 @@ import org.junit.jupiter.api.Nested import org.junit.jupiter.api.Test import kotlin.io.path.Path - class BazelPathSpecMapperTest { @Nested @DisplayName("fun map(projectView): Try tests") inner class MapTest { - // TODO https://youtrack.jetbrains.com/issue/BAZEL-58 + framework to test envs - @Disabled("for now we don't have a framework to change classpath, i'll fix it later") - @Test - fun `should return failure if it isn't possible to deduct bazel path from PATH and bazel path is null`() { - // given - val projectView = ProjectView.Builder(bazelPath = null).build().get() + // TODO https://youtrack.jetbrains.com/issue/BAZEL-58 + framework to test envs + @Disabled("for now we don't have a framework to change classpath, i'll fix it later") + @Test + fun `should return failure if it isn't possible to deduct bazel path from PATH and bazel path is null`() { + // given + val projectView = ProjectView.Builder(bazelPath = null).build().get() - // when - val bazelPathSpecTry = BazelPathSpecMapper.map(projectView) + // when + val bazelPathSpecTry = BazelPathSpecMapper.map(projectView) - // then - bazelPathSpecTry.isFailure shouldBe true - bazelPathSpecTry.cause::cause shouldBe ProjectViewToExecutionContextEntityMapperException::class - bazelPathSpecTry.cause.message shouldBe "Mapping project view into 'bazel path' failed! Could not find bazel on your PATH" - } + // then + bazelPathSpecTry.isFailure shouldBe true + bazelPathSpecTry.cause::cause shouldBe ProjectViewToExecutionContextEntityMapperException::class + bazelPathSpecTry.cause.message shouldBe "Mapping project view into 'bazel path' failed! Could not find bazel on your PATH" + } + @Disabled("for now we don't have a framework to change classpath, i'll fix it later") @Test fun `should return success with deducted bazel path from PATH if bazel path is null`() { // given