doc / ch.tutteli.atrium.reporting.text.impl / TextFeatureAssertionGroupFormatter

TextFeatureAssertionGroupFormatter

class TextFeatureAssertionGroupFormatter : NoSpecialChildFormattingSingleAssertionGroupTypeFormatter<FeatureAssertionGroupType>, TextAssertionFormatter (source)

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.

Its usage is intended for text output (e.g. to the console).

Constructors

<init>

TextFeatureAssertionGroupFormatter(bulletPoints: Map<KClass<out BulletPointIdentifier>, String>, assertionFormatterController: AssertionFormatterController, assertionPairFormatter: AssertionPairFormatter)

Represents an AssertionFormatter which formats AssertionGroups with an 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.

Functions

formatGroupHeaderAndGetChildParameterObject

fun formatGroupHeaderAndGetChildParameterObject(assertionGroup: AssertionGroup, parameterObject: AssertionFormatterParameterObject): AssertionFormatterParameterObject

Formats the group header of the given assertionGroup (with type T) -- appends the result to the sb of the given parameterObject -- and returns the AssertionFormatterParameterObject which shall be used for the AssertionGroup.assertions.

Inherited Functions

formatGroupAssertions

open fun formatGroupAssertions(formatAssertions: (AssertionFormatterParameterObject, (Assertion) -> Unit) -> Unit, childParameterObject: AssertionFormatterParameterObject): Unit

Formats the AssertionGroup.assertions -- has to call the given formatAssertions function in order that the AssertionFormatterController can steer the process.