doc / ch.tutteli.atrium.assertions.builders / DescriptiveAssertionWithFailureHint / ShowOption / showBasedOnSubjectOnlyIf

showBasedOnSubjectOnlyIf

open fun <T> showBasedOnSubjectOnlyIf(subjectProvider: SubjectProvider<T>, showSubStep: DescriptiveAssertionWithFailureHint.ShowSubjectDefinedOption<T>.() -> Pair<() -> Boolean, (T) -> Boolean>): Descriptive.DescriptionOption<DescriptiveAssertionWithFailureHint.FinalStep>

Defines that the failure hint shall only be shown based on a predicate influenced by the subject of the assertion.

You can use the other overload without subjectProvider in case the predicate is not based on the subject of the assertion.