Open ankushg opened 2 years ago
MocKMP is a test tool. Having a tool that generates actual implementations for expect interfaces is not a test tool and outside the scope of MocKMP.
Sorry I wasn’t clear: I’m definitely trying to use it in tests!
To be more specific:
What I’m looking for is being able to
That is not possible at the moment, due to this KSP issue: https://github.com/google/ksp/issues/567.
This forces us to apply a workaround: generate code for jvm (with the kspJvmTest
configuration) and apply the result to all source sets. This evidently breaks expect interfaces.
Once this KSP issue is fixed, then we'll be able to work on expect interfaces: we'll have KSP will run on each source-set, generating a mock for each full actual interface.
I reopen this issue because the use-case is valid, and MocKMP does not support it at the moment. However, until the aforementioned KSP issue is fixed, consider it dormant, as I don't think it can be done.
It would be nice to be able to mock an
expect interface
with generated mocks for theactual interface
for each target 😄