doc / ch.tutteli.atrium.reporting / AssertionFormatterController

AssertionFormatterController

interface AssertionFormatterController (source)

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.

Inheritors

DefaultAssertionFormatterController

class DefaultAssertionFormatterController : AssertionFormatterController

Represents an AssertionFormatterController which does nothing special in addition but just the job of the controller :)