fun <T> Descriptive.DescriptionOption<Descriptive.FinalStep>.withFailureHintBasedOnDefinedSubject(subjectProvider: SubjectProvider<T>, failureHintFactory: (T) -> Assertion): Descriptive.DescriptionOption<DescriptiveAssertionWithFailureHint.FinalStep>
(source)
Option to create a DescriptiveAssertion like assertion with an additional hint which is based on the subject of the assertion and which is only shown the subject is defined.
You can use withFailureHintBasedOnSubject in case you want to:
Or use withFailureHint which does not expect a subjectProvider in case your DescriptiveAssertion is not based on the subject of the assertion.