hasClass

inline fun <T : Any> Assert<Any>.hasClass()

Asserts the value has the expected kotlin class. This is an exact match, so assertThat("test").hasClass<String>() is successful but assertThat("test").hasClass<Any>() fails.

See also


fun <T : Any> Assert<T>.hasClass(kclass: KClass<out T>)

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> Assert<T>.hasClass(jclass: Class<out T>)

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