expectException<T extends Object> method
Flags this step to expect a runtime exception of type T during invocation.
Optionally validates that the resulting error message explicitly matches
expectedMessage.
Implementation
StepInput expectException<T extends Object>([String? expectedMessage]) {
return StepInput(
description: description,
callback: callback,
params: params,
exceptionType: T,
exceptionMessage: expectedMessage,
);
}