Skip to content

Instantly share code, notes, and snippets.

@sukyology

sukyology/block14.kt Secret

Created Jan 17, 2021
Embed
What would you like to do?
@Test
fun test3() {
val container: Container<SubSealed> = mockk(relaxed = true)
var i = 0;
every { i++; container.sealed } returns mockk()
val sealed: SubSealed = container.sealed
assertEquals(SubSealed::class, sealed::class) // success
assertEquals(1, i) // failed
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment