expectError

open override fun expectError(): ExpectDsl<T>

Creates a dynamic test expecting an error occurred.

Return

This DSL instance for method chaining.


open override fun <E : Throwable> expectError(expected: E.() -> Unit): ExpectDsl<T>

Creates a dynamic test for expectations on a specific error.

Return

This DSL instance for method chaining.

Parameters

E

The type of the expected error.

expected

A lambda function defining expectations on the error.