doc / ch.tutteli.atrium.assertions.builders / Explanatory / ExplanationOption / withExplanation

withExplanation

open fun withExplanation(translatable: Translatable, arg: Any, vararg otherArgs: Any): Explanatory.FinalStep (source)

Uses the given translatable together with the arg and optionally otherArgs to create an TranslatableWithArgs which is then used as ExplanatoryAssertion.explanation.

It delegates to the overload which expects a single Translatable; see there for more details about how the Translatable is used as ExplanatoryAssertion.explanation.

open fun withExplanation(description: String): Explanatory.FinalStep (source)

Uses the given description as explanation.

abstract fun withExplanation(explanation: Any?): Explanatory.FinalStep (source)

Uses the given explanation as ExplanatoryAssertion.explanation.

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.