doc / ch.tutteli.atrium.assertions.builders / withFailureHintBasedOnDefinedSubject

withFailureHintBasedOnDefinedSubject

fun <T> Descriptive.DescriptionOption<Descriptive.FinalStep>.withFailureHintBasedOnDefinedSubject(expect: Expect<T>, failureHintFactory: (T) -> Assertion): Descriptive.DescriptionOption<DescriptiveAssertionWithFailureHint.FinalStep> (source)
Deprecated: Use withHelpOnFailureBasedOnDefinedSubject; will be removed with 1.0.0

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:

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