Christian Sousa
05/06/2020, 4:00 PMclass A {
...
fun foo(): String { return "bar" }
}
class B {
private val instance = A()
fun bar(): String {
return instance.foo()
}
}
In a test, how can I mock the A when testing B? I tried with mockStatic and so on, but with no success yet..
I want to be able to mock A.foo
when called inside the B class.
Can anyone help with this?