diff --git a/src/test/kotlin/com/intellij/plugin/powershell/testFramework/DebuggerTestBase.kt b/src/test/kotlin/com/intellij/plugin/powershell/testFramework/DebuggerTestBase.kt index ba988f49..1674f7bd 100644 --- a/src/test/kotlin/com/intellij/plugin/powershell/testFramework/DebuggerTestBase.kt +++ b/src/test/kotlin/com/intellij/plugin/powershell/testFramework/DebuggerTestBase.kt @@ -3,15 +3,25 @@ package com.intellij.plugin.powershell.testFramework import com.intellij.openapi.command.WriteCommandAction import com.intellij.openapi.util.ThrowableComputable import com.intellij.openapi.vfs.VfsUtil +import com.intellij.plugin.powershell.lang.debugger.PSDebugClient import com.intellij.psi.PsiFile import com.intellij.psi.PsiManager +import com.intellij.testFramework.TestLoggerFactory +import com.intellij.testFramework.junit5.fixture.disposableFixture +import org.junit.jupiter.api.BeforeEach import kotlin.io.path.Path import kotlin.io.path.createDirectories -abstract class DebuggerTestBase: PowerShellTestBase() { +abstract class DebuggerTestBase : PowerShellTestBase() { + private val disposable = disposableFixture() private val testData = "testData" + @BeforeEach + fun setUpDebuggerTestBase() { + TestLoggerFactory.enableTraceLogging(disposable.get(), PSDebugClient::class.java) + } + protected fun copyAndOpenFile(nameRelativeToTestData: String): PsiFile { val fullName = "$testData/$nameRelativeToTestData" val original = DebuggerTestBase::class.java.classLoader.getResource(fullName) diff --git a/src/test/kotlin/com/intellij/plugin/powershell/testFramework/PowerShellTestBase.kt b/src/test/kotlin/com/intellij/plugin/powershell/testFramework/PowerShellTestBase.kt index 1c9b61ff..50f377a0 100644 --- a/src/test/kotlin/com/intellij/plugin/powershell/testFramework/PowerShellTestBase.kt +++ b/src/test/kotlin/com/intellij/plugin/powershell/testFramework/PowerShellTestBase.kt @@ -16,14 +16,10 @@ abstract class PowerShellTestBase { get() = Path(project.basePath!!) @BeforeEach - open fun setUp() { + fun setUp() { project = projectFixture.get() } - @AfterEach - open fun tearDown() { - } - @AfterEach fun tearDownEdt() { runInEdt {