Skip to content

Commit

Permalink
Implement clearStaticMockk for KFunction and KProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
krocard committed Apr 2, 2024
1 parent 29a3759 commit 9a112f0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class StaticMockTest {

@Test
fun simpleStaticMock() {
mockkStatic("io.mockk.it.StaticMockTestKt")
mockkStatic(::op)

every { 5 op 6 } returns 2

Expand All @@ -24,15 +24,15 @@ class StaticMockTest {

@Test
fun clearStateStaticMock() {
mockkStatic("io.mockk.it.StaticMockTestKt")
mockkStatic(::op)

every { 5 op 6 } returns 2

assertEquals(2, 5 op 6)

verify { 5 op 6 }

mockkStatic("io.mockk.it.StaticMockTestKt")
mockkStatic(::op)

verify(exactly = 0) { 5 op 6 }

Expand Down

0 comments on commit 9a112f0

Please sign in to comment.