doc / ch.tutteli.atrium.reporting.text.impl / SingleAssertionGroupTypeFormatter / formatGroup

formatGroup

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

Overrides AssertionFormatter.formatGroup

Checks whether assertionGroup is T or a sub type and if so, calls formatGroupHeaderAndGetChildParameterObject and uses the resulting child-AssertionFormatterParameterObject to format AssertionGroup.assertions.

If assertionGroup is not T or a sub type, then it throws an UnsupportedOperationException.

Parameters

assertionGroup - The assertion group which should be formatted.

parameterObject - The parameter object which contains inter alia the sb to which the result will be appended.

formatAssertions - The function which should be called to format the assertions of the given assertionGroup. It itself expects a function which formats single Assertions in the context of the given assertionGroup.

Exceptions

UnsupportedOperationException - if the given assertionGroup is not T or a sub type of it.

See Also

AssertionFormatter.formatGroup