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

withDescriptionAndRepresentation

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

Turns the given description into an Untranslatable and the given representationProvider into a LazyRepresentation and uses them as AssertionGroup.description, AssertionGroup.representation respectively.

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.

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

Wraps the given description into an Untranslatable and delegates to the overload which expects Translatable.

See the corresponding overload for more information.

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. Text.NULL).

Use the overload which expects a representation provider in case the computation is expensive.

Notice, if you want to use text (a String which is treated as raw string in reporting) as representation, then wrap it into a Text and pass it instead.