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.

withDescriptionAndNullableRepresentation

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

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

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.

Companion Object Functions

create

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