withHelpOnFailureBasedOnDefinedSubject

Option to create a DescriptiveAssertion like assertion with an additional hint which is based on the subject of the expectation and which is only shown the subject is defined.

You can use withHelpOnFailureBasedOnSubject in case you want to:

  • provide a hint also if the subject is absent.

  • do not show the hint in certain cases even if the subject is defined

Or use withHelpOnFailure which does not expect an Expect in case your DescriptiveAssertion is not based on the subject of the expectation.