I'm trying to mock the interface with the function that has a vararg argument. Is there anything special should be done to do it or is it not supported?
The interface I try to mock:
interface ResourceWrapper {
/**
* Returns a resource string
*/
fun getString(resId: StringResource, vararg args: Any): String
}
Generated file:
internal class MockResourceWrapper(
private val mocker: Mocker,
) : ResourceWrapper {
public override fun getString(resId: StringResource, args: Any): String =
this.mocker.register(this, "getString(dev.icerock.moko.resources.StringResource, kotlin.Any)",
resId, args)
}
The overriden function doesn't have a vararg modifier so I get a compilation error
Hello!
I'm trying to mock the interface with the function that has a
vararg
argument. Is there anything special should be done to do it or is it not supported?The interface I try to mock:
Generated file:
The overriden function doesn't have a
vararg
modifier so I get a compilation error