Interface AssertionFailureHandler
- All Known Implementing Classes:
AssertionFailureHandler.AssertionErrorFailureHandler,AssertionFailureHandler.ExceptionFailureHandler
Interface for handling failures in assertions.
- Since:
- 5.4.0
- Author:
- Simon Zambrovski
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFailure handler that throws anAssertionError.static classFailure handler that throws anWorkflowTestFixtureException. -
Method Summary
Modifier and TypeMethodDescriptionvoidFail the test with the given message.static AssertionFailureHandlerhandler(boolean throwFixtureException) Constructs a new failure handler.
-
Method Details
-
handler
Constructs a new failure handler.- Parameters:
throwFixtureException- whether to fail assertions. If set tofalse, the failures are delivered asAssertionErrors, else if set totrueasWorkflowTestFixtureExceptions.- Returns:
- failure handler.
-
fail
Fail the test with the given message.- Parameters:
message- the message to fail with.cause- the cause of the failure.
-