Skip to content

Commit

Permalink
fix: mock in test
Browse files Browse the repository at this point in the history
  • Loading branch information
cat2608 committed Mar 21, 2024
1 parent 73cca37 commit 27ae45b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/test/java/snyk/common/lsp/LanguageServerWrapperTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class LanguageServerWrapperTest {
unmockkAll()
mockkStatic("io.snyk.plugin.UtilsKt")
mockkStatic(ApplicationManager::class)
mockkStatic(ApplicationManager::class)
every { ApplicationManager.getApplication() } returns applicationMock
every { applicationMock.getService(WorkspaceTrustService::class.java) } returns trustServiceMock

Expand Down Expand Up @@ -121,15 +120,10 @@ class LanguageServerWrapperTest {
val featureFlag = "testFeatureFlag"
every { processMock.info().startInstant().isPresent } returns true
every { processMock.isAlive } returns true

every { cut.ensureLanguageServerInitialized() } returns true

every {
lsMock.workspaceService.executeCommand(any<ExecuteCommandParams>())
} returns CompletableFuture.completedFuture(mapOf("ok" to true))



// Act
val result = cut.getFeatureFlagStatus(featureFlag)

Expand Down

0 comments on commit 27ae45b

Please sign in to comment.