mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
30 lines
743 B
Kotlin
30 lines
743 B
Kotlin
package testhelpers
|
|
|
|
import eu.darken.capod.common.debug.logging.Logging
|
|
import eu.darken.capod.common.debug.logging.Logging.Priority.VERBOSE
|
|
import eu.darken.capod.common.debug.logging.log
|
|
import io.mockk.unmockkAll
|
|
import org.junit.jupiter.api.AfterAll
|
|
import testhelpers.logging.JUnitLogger
|
|
|
|
|
|
open class BaseTest {
|
|
init {
|
|
Logging.clearAll()
|
|
Logging.install(JUnitLogger())
|
|
testClassName = this.javaClass.simpleName
|
|
}
|
|
|
|
companion object {
|
|
private var testClassName: String? = null
|
|
|
|
@JvmStatic
|
|
@AfterAll
|
|
fun onTestClassFinished() {
|
|
unmockkAll()
|
|
log(testClassName!!, VERBOSE) { "onTestClassFinished()" }
|
|
Logging.clearAll()
|
|
}
|
|
}
|
|
}
|