Skip to content

Instantly share code, notes, and snippets.

@sukyology
Created January 17, 2021 02:44
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 sukyology/d546abf54f87809cd4010b2f9feafe61 to your computer and use it in GitHub Desktop.
Save sukyology/d546abf54f87809cd4010b2f9feafe61 to your computer and use it in GitHub Desktop.
@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