https://kotlinlang.org logo
#kotest
Title
# kotest
t

Tomasz Krakowiak

03/04/2022, 7:37 AM
Hello, Is there an issue when mocked method has an argument of type which is a value class?
Copy code
io.mockk.MockKException: Failed matching mocking signature for
SignedCall(retValue=, isRetValueMock=true, retType=class arrow.core.Either, self=SomeService(#1), method=someMethod-D7ixulQ(UUID, Source, Continuation), args=[null, com.example.SomeService$Source$Subclass0@2e0e5e9f, Continuation at com.example.SomeServiceTest$1$1.invokeSuspend(SomeServiceTest.kt:29)], invocationStr=SomeServiceTest(#1).someMethod-D7ixulQ(null, com.example.SomeService$Source$Subclass0@2e0e5e9f, continuation {}))
left matchers: [any()]
r

Richard Gomez

03/04/2022, 12:49 PM
This seems like an issue with mockk and not Kotest. Regardless, can you share the code for this test & the versions of mockk and kotest you're using?
t

Tomasz Krakowiak

03/04/2022, 12:52 PM
Ah, my mistake. Unfortunately I cannot share the code for this test. Versions: kotest: 4.6.2 mockk: 1.12.0 / 1.12.3
r

Richard Gomez

03/04/2022, 12:56 PM
I'm just curious how it's roughly being used for the sake of reproducing the issue. IIRC it's been a while since the last mockk release, so I wouldn't be surprised if value classes aren't fully supported.
In fact, this seems to be the case 😞 https://github.com/mockk/mockk/issues/152
t

Tomasz Krakowiak

03/04/2022, 12:58 PM
Thanks! Somehow couldn't find related issue.
r

Richard Gomez

03/04/2022, 2:47 PM
Yeah, it wasn't an obvious top result. Like I said, it's been a while since the last release so I had a feeling the issue would be about "inline" and not "value" classes.
4 Views