doc / ch.tutteli.atrium.reporting / AssertionFormatterController

AssertionFormatterController

interface AssertionFormatterController

Responsible to control the flow of reporting using registered AssertionFormatters.

Functions

format

abstract fun format(assertion: Assertion, parameterObject: AssertionFormatterParameterObject): Unit

Finds a suitable AssertionFormatter -- which was previously registered -- for the given assertion and formats it.

isExplanatoryAssertionGroup

open fun isExplanatoryAssertionGroup(assertion: Assertion): Boolean

Checks whether the given assertion is an AssertionGroup and if its type is an ExplanatoryAssertionGroupType.

register

abstract fun register(assertionFormatter: AssertionFormatter): Unit

Registers the given assertionFormatter, which means it will be considered when an Assertion shall be formatted.

Companion Object Functions

noSuitableAssertionFormatterFound

fun noSuitableAssertionFormatterFound(assertion: Assertion): Nothing

Throws an UnsupportedOperationException stating that no suitable AssertionFormatter was found for the given assertion.