Mikolaj
06/23/2023, 12:42 PMclass java.lang.Integer cannot be cast to class kotlin.UInt
when I try to mock a method with UInt return type. Is there any way around it? There is open issue (https://github.com/mockk/mockk/issues/544) but seems to me like it's a 'wont fix' kind of situation 🤔
My code looks like this:
@Test
fun `Should recalculate once`() = runTest {
coEvery { calculator(any()) } returns 0x12345678u
val controller = Controller(calculator)
controller.doCalculations() { }
assertEquals(1, controller.timesRecalculated)
}