doc / ch.tutteli.atrium.reporting / AssertionFormatter / formatNonGroup

formatNonGroup

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

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

The callee is responsible that not an AssertionGroup is passed to this function for which the outcome is unknown/unspecified. Call formatGroup to format an AssertionGroup. Call format in case you do not know what type assertion is.

This function should be in sync with canFormat. If canFormat returns true then this method should be able to format the given assertion without problems. If canFormat returns false then this method should throw an UnsupportedOperationException.

Parameters

assertion - The assertion which should be formatted (not an AssertionGroup).

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

Exceptions

UnsupportedOperationException - in case this AssertionFormatter cannot format the given assertion (canFormat returns false).