ShowOption
Option which allows specifying in which situations the failure hint should be shown.
Types
Link copied to clipboard
object Companion
Provides factory methods to create a ShowOption and serves as extension point.
Properties
Link copied to clipboard
abstract val showForAnyFailure: Descriptive.DescriptionOption<DescriptiveAssertionWithFailureHint.FinalStep>
Defines that the failure hint shall be shown in any case.
Functions
Link copied to clipboard
open fun <T> showBasedOnDefinedSubjectOnlyIf(expect: Expect<T>, predicate: (T) -> Boolean): Descriptive.DescriptionOption<DescriptiveAssertionWithFailureHint.FinalStep>
Defines that the failure hint shall be shown if the subject is defined and the given predicate holds for it
Link copied to clipboard
open fun <T> showBasedOnSubjectOnlyIf(expect: Expect<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 expectation.
Link copied to clipboard
abstract fun showOnlyIf(predicate: () -> Boolean): Descriptive.DescriptionOption<DescriptiveAssertionWithFailureHint.FinalStep>
Defines that the failure hint shall only be shown if the given predicate holds.
Link copied to clipboard
open fun <T> showOnlyIfSubjectDefined(expect: Expect<T>): Descriptive.DescriptionOption<DescriptiveAssertionWithFailureHint.FinalStep>
Defines that the failure hint shall be shown in any case as long as the subject is defined