atrium-core-impl-robstoll-lib / ch.tutteli.atrium.reporting / TextListBasedAssertionGroupFormatter

TextListBasedAssertionGroupFormatter

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

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.

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

Constructors

<init>

TextListBasedAssertionGroupFormatter(bulletPoint: String, assertionFormatterController: AssertionFormatterController, assertionPairFormatter: AssertionPairFormatter, clazz: Class<T>)

Represents an AssertionFormatter which formats AssertionGroups with type T by putting each assertion on an own line prefixed with a bullet point.

Functions

formatGroupHeaderAndGetChildMethodObject

open fun formatGroupHeaderAndGetChildMethodObject(assertionGroup: AssertionGroup, methodObject: AssertionFormatterMethodObject): AssertionFormatterMethodObject

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

Inherited Functions

formatGroupAssertions

open fun formatGroupAssertions(formatAssertions: (AssertionFormatterMethodObject, (Assertion) -> Unit) -> Unit, childMethodObject: AssertionFormatterMethodObject): Unit

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

Inheritors

TextListAssertionGroupFormatter

class TextListAssertionGroupFormatter : TextListBasedAssertionGroupFormatter<ListAssertionGroupType>

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