All Implemented Interfaces:
Fail, Test<Fail,Expected,ResultOfFail,Actual>

public class BasicFail extends BasicTest<Fail,Expected,ResultOfFail,Actual> implements Fail

A basic implementation an always failing test.

  • Constructor Details

    • BasicFail

      public BasicFail(Environment environment, Expected expected)

      Constructs a new fail with the given environment.

      Parameters:
      environment - the environment
  • Method Details

    • run

      public ResultOfFail run(Actual actual, Exception cause)
      Description copied from interface: Fail

      Fails this test (there is no other option) with the given cause.

      Specified by:
      run in interface Fail
      Parameters:
      cause - the cause of the failure
      Returns:
      the result of this fail