doc / ch.tutteli.atrium.reporting.text / TextAssertionFormatter

TextAssertionFormatter

interface TextAssertionFormatter : AssertionFormatter (source)

Marker interface for AssertionFormatter which are intended for text output, e.g. for terminal output.

Inherited Functions

canFormat

abstract fun canFormat(assertion: Assertion): Boolean

Denotes whether this AssertionFormatter was created to format Assertions such as the given assertion or not.

format

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

Formats the given assertion and appends the result to the sb of the given parameterObject.

formatGroup

abstract fun formatGroup(assertionGroup: AssertionGroup, parameterObject: AssertionFormatterParameterObject, formatAssertions: (AssertionFormatterParameterObject, (Assertion) -> Unit) -> Unit): Unit

Formats the given assertionGroup and appends the result to the sb of the given parameterObject.

formatNonGroup

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

Formats the given assertion and appends the result to the sb of the given parameterObject.

Inheritors

TextExplanatoryAssertionGroupFormatter

class TextExplanatoryAssertionGroupFormatter : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<ExplanatoryAssertionGroupType>, TextAssertionFormatter

Represents an AssertionFormatter which formats AssertionGroups with an ExplanatoryAssertionGroupType by neglecting the group header and defining an child-AssertionFormatterParameterObject which indicates that we are in an explanatory assertion.

TextFallbackAssertionFormatter

class TextFallbackAssertionFormatter : AssertionFormatter, TextAssertionFormatter

Formats an Assertion for text output (e.g. to the console) by using the given assertionPairFormatter to format the group header for AssertionGroups and uses the bullet point defined for RootAssertionGroupType as prefix for the AssertionGroup.assertions.

TextFeatureAssertionGroupFormatter

class TextFeatureAssertionGroupFormatter : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<FeatureAssertionGroupType>, TextAssertionFormatter

Represents an AssertionFormatter which formats AssertionGroups with a FeatureAssertionGroupType by using the given assertionPairFormatter to format the group header, additionally prefixing it with the "bullet point" (typically an arrow) defined for PrefixFeatureAssertionGroupHeader and uses the bullet point defined for FeatureAssertionGroupType as prefix for the AssertionGroup.assertions.

TextListBasedAssertionGroupFormatter

abstract class TextListBasedAssertionGroupFormatter<in T : AssertionGroupType> : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<T>, TextAssertionFormatter

Represents an AssertionFormatter which formats AssertionGroups with type T by using the given assertionPairFormatter to format the group header and using the given bulletPoint (see constructor) to prefix the AssertionGroup.assertions.

TextSummaryAssertionGroupFormatter

class TextSummaryAssertionGroupFormatter : SingleAssertionGroupTypeFormatter<SummaryAssertionGroupType>, TextAssertionFormatter

Represents an AssertionFormatter which formats AssertionGroups with a SummaryAssertionGroupType by using the given assertionPairFormatter to format the group header and uses the bullet point defined for PrefixSuccessfulSummaryAssertion as prefix for successful AssertionGroup.assertions and the bullet point defined for PrefixFeatureAssertionGroupHeader as prefix for failing AssertionGroup.assertions.