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

withDescription

open fun withDescription(translatable: Translatable, arg: Any, vararg otherArgs: Any): 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 withDescription(translatable: Translatable): FinalStep (source)

Uses the given translatable as explanation.

In detail, the given translatable is turned into a RawString so that an ObjectFormatter translates the given translatable and treats the result as raw string.

abstract fun withDescription(explanation: Any?): FinalStep (source)

Uses the given explanation as ExplanatoryAssertion.explanation.

In case you want to pass a String which should be treated as RawString in reporting, then please wrap it into a RawString (RawString.create("Your text..").