Skip to content

Instantly share code, notes, and snippets.


sukyology/ Secret

Created Jan 17, 2021
What would you like to do?
class FieldExists {
var field: String = "Hello"
class ExampleTest {
fun `field exists class mocking`() {
val fieldExists = mockk<FieldExists>()
assertEquals("Hello", fieldExists.field)
// java.lang.AssertionError:
// Expected :Hello
// Actual :null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment