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

AssertionGroupDescriptionAndRepresentationOption

interface AssertionGroupDescriptionAndRepresentationOption<out T : AssertionGroupType, R> (source)

Option step which allows to specify AssertionGroup.description and AssertionGroup.representation.

Properties

groupType

abstract val groupType: T

The previously defined AssertionGroup.type.

Functions

withDescriptionAndEmptyRepresentation

open fun withDescriptionAndEmptyRepresentation(description: Translatable): R

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

withDescriptionAndRepresentation

open fun withDescriptionAndRepresentation(description: Translatable, representationProvider: () -> Any?): R

Uses the given description as AssertionGroup.description and representationProvider to create a LazyRepresentation which is used as AssertionGroup.representation.

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

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

Companion Object Functions

create

fun <T : AssertionGroupType, R> create(type: T, factory: (T, Translatable, Any) -> R): AssertionGroupDescriptionAndRepresentationOption<T, R>

Factory method to create an AssertionGroupDescriptionAndRepresentationOption with the given assertion group type and another factory method which creates the next step in the building process.