expectErrorType

open fun <E : Throwable> expectErrorType(expected: KClass<E>): SE

Expects an error of a specific type.

Return

The expecter instance for method chaining.

Parameters

E

The type of the expected error.

expected

The KClass of the expected error type.


open fun <E : Throwable> expectErrorType(expected: Class<E>): SE

Expects an error of a specific type (Java Class version).

This is a convenience overload that accepts a Java Class instance.

Return

The expecter instance for method chaining.

Parameters

E

The type of the expected error.

expected

The Class of the expected error type.