Created
November 2, 2018 18:31
-
-
Save oleksiyp/ea7268d9ad194619ea4706416f304c01 to your computer and use it in GitHub Desktop.
"MockK: intentions" data class copy
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
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