Skip to content

Commit

Permalink
Unmock mocks after each test #3338
Browse files Browse the repository at this point in the history
  • Loading branch information
fritschldwg committed Nov 21, 2023
1 parent f54bcb2 commit 4c17a9f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import io.mockk.every
import io.mockk.mockk
import io.mockk.mockkObject
import io.mockk.slot
import io.mockk.unmockkAll
import io.mockk.verify
import mu.KLogger
import mu.KotlinLogging
import org.assertj.core.api.Assertions
import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.Test
import org.skyscreamer.jsonassert.JSONAssert
import org.skyscreamer.jsonassert.JSONCompareMode
Expand All @@ -27,6 +29,11 @@ class ProjectSerializerTest {
val filename = tempDir.absolute().toString() + "test.cc.json"
val project = mockk<Project>()

@AfterEach
fun afterTest() {
unmockkAll()
}

@Test
fun `should serialize project`() {
val jsonReader = this.javaClass.classLoader.getResourceAsStream(EXAMPLE_JSON_VERSION_1_3)!!.reader()
Expand Down

0 comments on commit 4c17a9f

Please sign in to comment.