doesNotHaveClass

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

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

See also


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

Asserts the value does not have the expected kotlin class. This is an exact match, so assertThat("test").doesNotHaveClass(String::class) fails but assertThat("test").doesNotHaveClass(Any::class) is successful.

See also

fun <T : Any> Assert<T>.doesNotHaveClass(jclass: Class<out T>)

Asserts the value does not have the expected java class. This is an exact match, so assertThat("test").doesNotHaveClass(String::class.java) is fails but assertThat("test").doesNotHaveClass(Any::class.java) is successful.

See also