![JAR search and dependency download from the Maven repository](/logo.png)
io.justdevit.kotlin.boost.kotest.mockk.MockkExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of boost-kotest-mockk Show documentation
Show all versions of boost-kotest-mockk Show documentation
Library to boost working with Kotlin/JVM projects.
The newest version!
package io.justdevit.kotlin.boost.kotest.mockk
import io.kotest.core.listeners.BeforeEachListener
import io.kotest.core.test.TestCase
import io.mockk.clearAllMocks
/**
* MockkExtension is an object that extends the [BeforeEachListener] interface.
* It provides a single method, `beforeEach`, which is called before each test case
* is executed.
*
* The purpose of this class is to clear all mocks using the `clearAllMocks()`
* function before each test case, ensuring a clean state for mocking.
*/
object MockkExtension : BeforeEachListener {
override suspend fun beforeEach(testCase: TestCase) {
clearAllMocks()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy