Browse Tag

mock

Mock final classes on Kotlin

internal class Foo {
    internal fun bar(x: Int, y: Int, zip: Zip) = x + y + zip.doIt()
}
internal class Zip {
    internal fun doIt() = 0
}

When we have two classes like above and try to mock Zip class like below:

Keep Reading