Package org.assertj.core.error
Class DescriptionFormatter
java.lang.Object
org.assertj.core.error.DescriptionFormatter
Formats the
Descriptions to be included in assertion errors.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFormats the givenby surrounding its text value with square brackets and adding a space at the end.Descriptionstatic DescriptionFormatterinstance()Returns the singleton instance of this class.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
DescriptionFormatter
DescriptionFormatter()
-
-
Method Details
-
instance
Returns the singleton instance of this class.- Returns:
- the singleton instance of this class.
-
format
Formats the givenby 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
Stringif theDescriptionisnull.
-