We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The ability to call mockk functions from java, without much hassle.
For example, something like the following
import org.junit.jupiter.api.Test; import static io.mockk.MockKKt.*; class JavaTest { @Test public void test() { var car = mockk(Car.class); every(scope -> car.drive(Direction.NORTH)).returns(Outcome.OK); car.drive(Direction.NORTH); // returns OK verify(scope -> car.drive(Direction.NORTH)); confirmVerified(car); } }
Can't call entrypoints (mockk, spyk) due to functions being marked as inline.
By creating additional non-inlined overloads, annotated with @JvmOverloads, it should be possible to provide an ok java experience.
@JvmOverloads
I've opened a draft PR #1207 to show what the overloads would look like to provide a better java interop.
The text was updated successfully, but these errors were encountered:
Thanks for looking into this!
The non-inlined overloads look good to me.
Feel free to finish the PR and I'll be super glad to review it :)
Sorry, something went wrong.
No branches or pull requests
Expected Behavior
The ability to call mockk functions from java, without much hassle.
For example, something like the following
Current Behavior
Can't call entrypoints (mockk, spyk) due to functions being marked as inline.
Thoughts on improving java integration
By creating additional non-inlined overloads, annotated with
@JvmOverloads
, it should be possible to provide an ok java experience.I've opened a draft PR #1207 to show what the overloads would look like to provide a better java interop.
The text was updated successfully, but these errors were encountered: