DescriptionOption

Option step which allows to specify the description of a descriptive like assertion (such as DescriptiveAssertion).

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val test: () -> Boolean

The previously defined test which is used to determine Assertion.holds.

Functions

Link copied to clipboard
abstract fun withDescriptionAndRepresentation(description: Translatable, representation: Any?): R

Uses the given description as DescriptiveAssertion.description and representation as DescriptiveAssertion.representation unless representation is null in which case a representation for null is used (e.g. Text.NULL).

open fun withDescriptionAndRepresentation(description: String, representation: Any?): R

Wraps the given description into an Untranslatable and uses it as DescriptiveAssertion.description next to representation which is used as DescriptiveAssertion.representation unless representation is null in which case a representation for null is used (e.g. Text.NULL).

Link copied to clipboard

Option to create a DescriptiveAssertion like assertion with an additional hint which might be shown if the Descriptive.DescriptionOption.test fails.

Link copied to clipboard

Option to create a DescriptiveAssertion like assertion with an additional hint which is based on the subject of the expectation and which is only shown if the subject is defined (and optionally based on a given showOnlyIf predicate).

Link copied to clipboard

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