Skip to content

Instantly share code, notes, and snippets.

@christianb
Created July 30, 2019 15:03
Show Gist options
  • Save christianb/f6cfefc693229938f1b09c6a769040ce to your computer and use it in GitHub Desktop.
Save christianb/f6cfefc693229938f1b09c6a769040ce to your computer and use it in GitHub Desktop.
Verify the argument passed to a function are correct using Mockk Matchers
class foo {
fun bar(list: List<Any>)
}
// verifies the list is empty when passed to bar()
verify { foo.bar(match { it.isEmpty() }) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment