Maybe this is very basic question but could not find anything online.
I have created a object class in kotlin
contains few methods. I am calling those from ViewModel
and I have written junit
test case for ViewModel
where object class instance is mocked, fine so far.
Now, I want to write junit for my object class separately as well even though from ViewModel
verify()
calls are working fine.
Some code snippet from my project
object InfoHelper {
fun method(param: Xyz): Boolean {
return when(param) {
Result.OK -> true
else -> false
}
}
}