Skip to content

Instantly share code, notes, and snippets.

@oleksiyp
Created November 2, 2018 18:31
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/ea7268d9ad194619ea4706416f304c01 to your computer and use it in GitHub Desktop.
Save oleksiyp/ea7268d9ad194619ea4706416f304c01 to your computer and use it in GitHub Desktop.
"MockK: intentions" data class copy
data class Entity(
val id: Int = 1,
val firstName: String = "John",
val lastName: String = "Smith",
val age: Int = 44
)
every {
entity.copy(
firstName = "Sam",
lastName = any()
)
} returns Entity(
2,
"Sam",
"Smith",
55
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment