Skip to content

Commit c842495

Browse files
committed
fix test
1 parent a026102 commit c842495

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import com.intellij.openapi.vfs.newvfs.events.VFileContentChangeEvent
1515
import com.intellij.openapi.vfs.newvfs.events.VFileEvent
1616
import com.intellij.util.messages.MessageBus
1717
import com.intellij.util.messages.MessageBusConnection
18-
import io.mockk.coEvery
1918
import io.mockk.every
2019
import io.mockk.just
2120
import io.mockk.mockk
@@ -28,6 +27,7 @@ import org.eclipse.lsp4j.DidChangeTextDocumentParams
2827
import org.eclipse.lsp4j.DidCloseTextDocumentParams
2928
import org.eclipse.lsp4j.DidOpenTextDocumentParams
3029
import org.eclipse.lsp4j.DidSaveTextDocumentParams
30+
import org.eclipse.lsp4j.jsonrpc.messages.ResponseMessage
3131
import org.eclipse.lsp4j.services.TextDocumentService
3232
import org.junit.Assert.assertEquals
3333
import org.junit.Before
@@ -67,10 +67,10 @@ class TextDocumentServiceHandlerTest {
6767
every { project.serviceIfCreated<AmazonQLspService>() } returns mockLspService
6868

6969
// Mock the LSP service's executeSync method as a suspend function
70-
coEvery {
71-
mockLspService.executeSync(any())
70+
every {
71+
mockLspService.executeSync<CompletableFuture<ResponseMessage>>(any())
7272
} coAnswers {
73-
val func = firstArg<suspend (AmazonQLanguageServer) -> Unit>()
73+
val func = firstArg<suspend (AmazonQLanguageServer) -> CompletableFuture<ResponseMessage>>()
7474
func.invoke(mockLanguageServer)
7575
}
7676

0 commit comments

Comments
 (0)