Created
November 2, 2018 18:45
-
-
Save oleksiyp/c9dbe87fab4b106a0567ef4c7dd2f8bb to your computer and use it in GitHub Desktop.
"MockK: intentions" generic function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Cls { | |
fun <T>genericFn(): T | |
fun otherFn(param: Int) = param + 1 | |
} | |
val mock = mockk<Cls>() | |
every { | |
mock.otherFn(mock.genericFn()) | |
} returns 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment