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

showBasedOnSubjectOnlyIf

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

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

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