atrium-core-impl-robstoll-lib / ch.tutteli.atrium.reporting / SingleAssertionGroupTypeFormatter / formatGroup

formatGroup

fun formatGroup(assertionGroup: AssertionGroup, methodObject: AssertionFormatterMethodObject, formatAssertions: (AssertionFormatterMethodObject, (Assertion) -> Unit) -> Unit): Unit

Checks whether assertionGroup is T or a sub type and if so, calls formatGroupHeaderAndGetChildMethodObject and uses the resulting child-AssertionFormatterMethodObject 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. methodObject - The method 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