Skip to content

Commit

Permalink
fix: failing test in Language Server Wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiandoetsch committed Mar 18, 2024
1 parent ae94063 commit 8557349
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/java/snyk/common/lsp/LanguageServerWrapperTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ import org.junit.After
import org.junit.Before
import org.junit.Test
import snyk.pluginInfo
import snyk.trust.WorkspaceTrustService
import java.util.concurrent.CompletableFuture

class LanguageServerWrapperTest {

private val applicationMock: Application = mockk()
private val projectMock: Project = mockk()
private val lsMock: LanguageServer = mockk()
private val settings = SnykApplicationSettingsStateService()
private val trustServiceMock = mockk<WorkspaceTrustService>(relaxed = true)

private lateinit var cut: LanguageServerWrapper

@Before
Expand All @@ -37,8 +41,8 @@ class LanguageServerWrapperTest {
mockkStatic("io.snyk.plugin.UtilsKt")
mockkStatic(ApplicationManager::class)
mockkStatic(ApplicationManager::class)
val applicationMock = mockk<Application>()
every { ApplicationManager.getApplication() } returns applicationMock
every { applicationMock.getService(WorkspaceTrustService::class.java) } returns trustServiceMock

val projectManagerMock = mockk<ProjectManager>()
every { applicationMock.getService(ProjectManager::class.java) } returns projectManagerMock
Expand Down

0 comments on commit 8557349

Please sign in to comment.