kotest-assertions-core / io.kotest.matchers.reflection / kotlin.reflect.KClass

Extensions for kotlin.reflect.KClass

shouldBeAnnotatedWith

fun <T : Annotation> KClass<*>.shouldBeAnnotatedWith(block: (T) -> Unit = {}): Unit

shouldBeCompanion

fun KClass<*>.shouldBeCompanion(): Unit

shouldBeData

fun KClass<*>.shouldBeData(): Unit

shouldBeSealed

fun KClass<*>.shouldBeSealed(): Unit

shouldBeSubtypeOf

fun <T> KClass<*>.shouldBeSubtypeOf(): Unit

shouldBeSupertypeOf

fun <T> KClass<*>.shouldBeSupertypeOf(): Unit

shouldHaveAnnotations

fun KClass<*>.shouldHaveAnnotations(): Unit
infix fun KClass<*>.shouldHaveAnnotations(count: Int): Unit

shouldHaveFunction

fun KClass<*>.shouldHaveFunction(name: String, block: (KFunction<*>) -> Unit): Unit
infix fun KClass<*>.shouldHaveFunction(name: String): Unit

shouldHaveMemberProperty

fun KClass<*>.shouldHaveMemberProperty(name: String, block: (KProperty<*>) -> Unit): Unit
infix fun KClass<*>.shouldHaveMemberProperty(name: String): Unit

shouldHavePrimaryConstructor

fun KClass<*>.shouldHavePrimaryConstructor(): Unit

shouldHaveVisibility

infix fun KClass<*>.shouldHaveVisibility(expected: KVisibility): Unit

shouldNotBeAnnotatedWith

fun <T : Annotation> KClass<*>.shouldNotBeAnnotatedWith(): Unit

shouldNotBeCompanion

fun KClass<*>.shouldNotBeCompanion(): Unit

shouldNotBeData

fun KClass<*>.shouldNotBeData(): Unit

shouldNotBeSealed

fun KClass<*>.shouldNotBeSealed(): Unit

shouldNotBeSubtypeOf

fun <T> KClass<*>.shouldNotBeSubtypeOf(): Unit

shouldNotBeSupertypeOf

fun <T> KClass<*>.shouldNotBeSupertypeOf(): Unit

shouldNotHaveAnnotations

fun KClass<*>.shouldNotHaveAnnotations(): Unit
infix fun KClass<*>.shouldNotHaveAnnotations(count: Int): Unit

shouldNotHaveFunction

infix fun KClass<*>.shouldNotHaveFunction(name: String): Unit

shouldNotHaveMemberProperty

infix fun KClass<*>.shouldNotHaveMemberProperty(name: String): Unit

shouldNotHavePrimaryConstructor

fun KClass<*>.shouldNotHavePrimaryConstructor(): Unit

shouldNotHaveVisibility

infix fun KClass<*>.shouldNotHaveVisibility(expected: KVisibility): Unit