fun <T : Any> Assert<T>.hasClass(kclass: KClass<out T>): Unit
Platform and version requirements: Common
Asserts the value has the expected kotlin class. This is an exact match, so assertThat("test").hasClass(String::class)
is successful but assertThat("test").hasClass(Any::class) fails.
See Also
fun <T : Any> <ERROR CLASS><T>.hasClass(jclass: Class<out T>): <ERROR CLASS>
Platform and version requirements: JVM
Asserts the value has the expected java class. This is an exact match, so
assertThat("test").hasClass(String::class.java) is successful but assertThat("test").hasClass(Any::class.java) fails.
See Also