-
Notifications
You must be signed in to change notification settings - Fork 6
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
NullPointerException thrown during migration #12
Comments
Hi! The first problem here is that Mokkery does not support call chains. It means that syntax below is not supported every { dependency.otherDependency.call() } returns Unit
verify { dependency.otherDependency.call() } You have to perform this operations directly: val otherDependency = mock<OtherDependency> { every { call() } returns Unit }
every { dependency.otherDependency } returns otherDependency
verify { otherDependency.call() } The second problem is that PS I see that you keep each call in single |
@lupuuss thank you for the expiation, this one is also resolved together with the other ones 🙂 |
No problem @mustafaozhan ! Thank you for reporting the issues! |
Hello,
Thank you for this amazing mocking library, thanks to it, I get rid of ksp and decreased my build times, also finally I was able to move my project to Kotlin 2.0.
During the migration from Mockative to Mokkery I had various issues and couldn't fix 3 of them. This issue is targeting to one of it.
If you check the linked PR, I have commented out one
verify
line. This line was working fine with Mockative, I had to comment it during Mokkery migration since it was giving the below error:You can see the full log in the link I shared below.
Let me know if anything is needed from my end!
Log: https://github.com/Oztechan/CCC/actions/runs/9614886435/job/26546544559?pr=3581
PR: Oztechan/CCC#3581
The text was updated successfully, but these errors were encountered: