mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
(cherry picked from commit bcb3c215ddcccfad3311ed5163503175e54254a4) IJ-CR-166188 GitOrigin-RevId: 0a16d89676ee5f7d9f80688805bd4312d7f20ccd
37 lines
984 B
Kotlin
37 lines
984 B
Kotlin
@file:Suppress("TestFunctionName")
|
|
|
|
package com.intellij.mcpserver.toolsets
|
|
|
|
import com.intellij.mcpserver.McpToolsetTestBase
|
|
import com.intellij.mcpserver.toolsets.general.ErrorToolset
|
|
import com.intellij.openapi.application.EDT
|
|
import com.intellij.openapi.fileEditor.FileEditorManager
|
|
import io.kotest.common.runBlocking
|
|
import kotlinx.coroutines.Dispatchers
|
|
import kotlinx.coroutines.withContext
|
|
import kotlinx.serialization.json.buildJsonObject
|
|
import org.junit.jupiter.api.Test
|
|
|
|
class ErrorToolsetTest : McpToolsetTestBase() {
|
|
@Test
|
|
fun get_current_file_errors() = runBlocking {
|
|
withContext(Dispatchers.EDT) {
|
|
FileEditorManager.getInstance(project).openFile(mainJavaFile, true)
|
|
}
|
|
testMcpTool(
|
|
ErrorToolset::get_current_file_errors.name,
|
|
buildJsonObject {},
|
|
"[]"
|
|
)
|
|
}
|
|
|
|
@Test
|
|
fun get_project_problems() = runBlocking {
|
|
testMcpTool(
|
|
ErrorToolset::get_project_problems.name,
|
|
buildJsonObject {},
|
|
"[]"
|
|
)
|
|
}
|
|
}
|