-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin - Unable to return value classes #456
Comments
Update: The issue seems to arise only when the mocked method is used within a runBlocking corroutine. When returning the mock inside a "normal" piece of code, the mocking is done properly. |
I'm adding a fully functional test:
|
Related issue https://youtrack.jetbrains.com/issue/KT-51641 |
does anybody have a workaround for this? I'm trying to use |
Same issue here, it's really annoying. |
For anyone else who found their way here, I found a workaround to using eq() and any() for an inline value class in #309 |
When returning a value class from a mocked method, class cast can not be done properly
Sample code:
When executing that code and getting the mock the response is as follows:
Tested returning a simple type like String (to discard matcher failing) and worked successfully.
The text was updated successfully, but these errors were encountered: