Created
November 2, 2018 18:38
-
-
Save oleksiyp/2a9fad26566685d891456e6cbd99a90a to your computer and use it in GitHub Desktop.
"MockK: intentions" static mockk
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
// --- top level function --- | |
mockkStatic("pkg.FileKt") | |
every { topLevelFunctionInFileKt() } returns 5 | |
// --- Java static function --- | |
mockkStatic(Uri::class) | |
every { Uri.parse("http://test/path") } returns Uri("http", "test", "path") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment