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

DescriptiveLikeAssertionDescriptionOption

interface DescriptiveLikeAssertionDescriptionOption<R> (source)

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

Properties

test

abstract val test: () -> Boolean

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

Functions

withDescriptionAndNullableRepresentation

open fun withDescriptionAndNullableRepresentation(description: Translatable, representation: Any?): R

Uses the given description as DescriptiveAssertion.description and representation as DescriptiveAssertion.representation unless representation is null in which case RawString.NULL is used.

withDescriptionAndRepresentation

abstract fun withDescriptionAndRepresentation(description: Translatable, representation: Any): R

Uses the given description as AssertionGroup.description and representation as AssertionGroup.representation.

Companion Object Functions

create

fun <R> create(test: () -> Boolean, factory: (() -> Boolean, Translatable, Any) -> R): DescriptiveLikeAssertionDescriptionOption<R>

Extension Functions

withFailureHint

fun DescriptiveLikeAssertionDescriptionOption<DescriptiveAssertionFinalStep>.withFailureHint(failureHintFactory: () -> Assertion): DescriptiveAssertionWithFailureHintShowOption

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