doc / ch.tutteli.atrium.core / CoreFactoryCommon / newTextSameLineAssertionPairFormatter

newTextSameLineAssertionPairFormatter

abstract fun newTextSameLineAssertionPairFormatter(objectFormatter: ObjectFormatter, translator: Translator): AssertionPairFormatter (source)

Creates an AssertionPairFormatter which is intended for text output (e.g. for the console) and puts assertion pairs on the same line.

As an example assert(10).toBe(9) results in the following error:

assert: 10        (java.lang.Integer <934275857>)
◆ to be: 9        (java.lang.Integer <1364913072>)

Parameters

objectFormatter - The formatter which is used to format objects other than Assertions.

translator - The translator which is used to translate Translatable such as DescriptiveAssertion.description.

Return
The newly created assertion formatter.