Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down