expectError
Expects that an error occurred during command execution.
This method validates that the command execution resulted in an exception or error condition, without specifying the error type.
Return
the current expecter instance for method chaining
Throws
if no error occurred during command execution
Expects a specific error with detailed validation.
This method validates both that an error occurred and that it matches the expected error type and properties.
Return
the current expecter instance for method chaining
Parameters
the expected type of the Throwable
a lambda function that receives the error and performs detailed assertions
Throws
if no error occurred or the error doesn't match expectations
if the error cannot be cast to the expected type
Expects a specific error with detailed validation using a Consumer.
Java-friendly overload for expectError that accepts a Consumer instead of a lambda.
Return
the current expecter instance for method chaining
Parameters
the expected type of the Throwable
a Consumer that receives the error and performs detailed assertions