@Test
fun `test mocking Instant`() {
val expectedResult = Instant.parse("2017-11-01T11:04:56Z")
mockkStatic(Instant::class)
every { Instant.now() } returns expectedResult
val result = Instant.now()
assertEquals(expectedResult, result)
unmockkStatic(Instant::class)
}
p
poohbar
05/23/2019, 2:13 PM
yeah, the issue is that i thought i could mock this globally for all the tests