Skip to content

Instantly share code, notes, and snippets.

@oleksiyp
Created November 2, 2018 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oleksiyp/2a9fad26566685d891456e6cbd99a90a to your computer and use it in GitHub Desktop.
Save oleksiyp/2a9fad26566685d891456e6cbd99a90a to your computer and use it in GitHub Desktop.
"MockK: intentions" static mockk
// --- 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