abstract fun canFormat(assertion: Assertion): Boolean
Denotes whether this AssertionFormatter was created to format Assertions such as the given assertion or not.
This function should be in sync with format and formatGroup. If assertion is an AssertionGroup and
this method returns true
then formatGroup should be able to format the given assertion. On the other hand,
if it returns false
then formatGroup should throw an UnsupportedOperationException.
The same applies for format where format should additionally throw an UnsupportedOperationException
if an AssertionGroup is passed.
assertion
- The Assertion which builds the basis to answer the question whether this
AssertionFormatter can format such kinds or not.
Return
true
if this AssertionFormatter ca format the given assertion; false
otherwise.