atrium-domain-builders-jvm / ch.tutteli.atrium.domain.builders.reporting / TextAssertionFormatterOptionCommon

TextAssertionFormatterOptionCommon

interface TextAssertionFormatterOptionCommon (source)

Provides options to register AssertionFormatters to the chosen AssertionFormatterFacade -- those options have to be provided on all platforms.

Properties

assertionPairFormatter

abstract val assertionPairFormatter: <ERROR CLASS>

The previously chosen AssertionPairFormatter.

options

abstract val options: AssertionFormatterChosenOptions

The so far chosen options which are relevant to create AssertionFormatters.

Functions

withTextAssertionFormatter

abstract fun withTextAssertionFormatter(factory: (AssertionFormatterChosenOptions) -> (<ERROR CLASS>) -> <ERROR CLASS>, vararg otherFactories: (AssertionFormatterChosenOptions) -> (<ERROR CLASS>) -> <ERROR CLASS>): AtriumErrorAdjusterOption

Uses the given factory and otherFactories to create and register AssertionFormatters to the specified AssertionFormatterChosenOptions.assertionFormatterFacade.

withTextCapabilities

abstract fun withTextCapabilities(vararg bulletPoints: Pair<KClass<out <ERROR CLASS>>, String>): AtriumErrorAdjusterOption

Uses CoreFactory.registerTextAssertionFormatterCapabilities to register the default AssertionFormatters intended for text output -- using the defined assertionPairFormatter, AssertionFormatterChosenOptions.objectFormatter and AssertionFormatterChosenOptions.translator -- to the specified AssertionFormatterChosenOptions.assertionFormatterFacade where the given bulletPoints can be used to customise the predefined bullet points.

Extension Functions

asExpect

fun <T, A> A.asExpect(): <ERROR CLASS><T>
fun <T : Any, A> A.asExpect(assertionCreator: <ERROR CLASS><T>.() -> Unit): A

Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable.

Inheritors

TextAssertionFormatterOption

expect interface TextAssertionFormatterOption : TextAssertionFormatterOptionCommon

Provides options to register AssertionFormatters to the chosen AssertionFormatterFacade -- the platform specific interface might provide further options.