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

withFailureHintBasedOnSubject

fun <T> Descriptive.DescriptionOption<Descriptive.FinalStep>.withFailureHintBasedOnSubject(subjectProvider: SubjectProvider<T>, failureHintSubStep: DescriptiveAssertionWithFailureHint.FailureHintSubjectDefinedOption<T>.() -> Pair<() -> Assertion, (T) -> Assertion>): DescriptiveAssertionWithFailureHint.ShowOption

Option to create a DescriptiveAssertion like assertion with an additional hint (which is based on the subject of the assertion) which might be shown if the Descriptive.DescriptionOption.test fails.

You can use withFailureHint which does not expect a subjectProvider in case your DescriptiveAssertion is not based on the subject of the assertion.