Interface AssertionFailureHandler

All Known Implementing Classes:
AssertionFailureHandler.AssertionErrorFailureHandler, AssertionFailureHandler.ExceptionFailureHandler

@Internal public interface AssertionFailureHandler
Interface for handling failures in assertions.
Since:
5.4.0
Author:
Simon Zambrovski
  • Method Details

    • handler

      static AssertionFailureHandler handler(boolean throwFixtureException)
      Constructs a new failure handler.
      Parameters:
      throwFixtureException - whether to fail assertions. If set to false, the failures are delivered as AssertionErrors, else if set to true as WorkflowTestFixtureExceptions.
      Returns:
      failure handler.
    • fail

      void fail(String message, Throwable cause)
      Fail the test with the given message.
      Parameters:
      message - the message to fail with.
      cause - the cause of the failure.