is there any pattern for faking Kotlin classes exp...
# multiplatform
m
is there any pattern for faking Kotlin classes exposed to Swift? Let's say I have
LoadUserUseCase
in my Kotlin shared code. In Swift i have a
UserViewModel
which has the usecase injected. Now i want to write tests for this ViewModel, so I need to create a fake. But there is no protocol to conform to and of course
Cannot inherit from non-open class 'LoadUserUseCase' outside of its defining module
r
Make
LoadUserUseCase
an interface instead of a class. It will translate to Swift as a protocol you can implement.
m
ha, I just started to do that, but didn;t know if it would work, thank you!