kotest-assertions-core / io.kotest.matchers.types / kotlin.Any

Extensions for kotlin.Any

shouldBeInstanceOf

Verifies that this is instanceof T

fun <T : Any> Any?.shouldBeInstanceOf(block: (T) -> Unit = { }): T

shouldBeSameInstanceAs

infix fun Any?.shouldBeSameInstanceAs(ref: Any?): Unit

shouldBeTypeOf

Verifies that this is exactly of type T

fun <T : Any> Any?.shouldBeTypeOf(block: (T) -> Unit = { }): T

shouldNotBeInstanceOf

Verifies that this is NOT Instanceof T

fun <T : Any> Any?.shouldNotBeInstanceOf(): Unit

shouldNotBeSameInstanceAs

infix fun Any?.shouldNotBeSameInstanceAs(ref: Any?): Unit

shouldNotBeTypeOf

Verifies that this is NOT exactly of type T

fun <T : Any> Any?.shouldNotBeTypeOf(): Unit