Package org.assertj.core.error
Class DescriptionFormatter
java.lang.Object
org.assertj.core.error.DescriptionFormatter
Formats the
Description
s to be included in assertion errors.- Author:
- Alex Ruiz
-
Method Summary
Modifier and TypeMethodDescriptionFormats the given
by surrounding its text value with square brackets and adding a space at the end.Description
static DescriptionFormatter
instance()
Returns the singleton instance of this class.
-
Method Details
-
instance
Returns the singleton instance of this class.- Returns:
- the singleton instance of this class.
-
format
Formats the given
by surrounding its text value with square brackets and adding a space at the end.Description
- Parameters:
d
- the description to format. It can benull
.- Returns:
- the formatted description, or an empty
String
if theDescription
isnull
.
-