Package org.assertj.core.error
Class DescriptionFormatter
- java.lang.Object
-
- org.assertj.core.error.DescriptionFormatter
-
public class DescriptionFormatter extends java.lang.ObjectFormats thes to be included in assertion errors.Description
-
-
Field Summary
Fields Modifier and Type Field Description private static DescriptionFormatterINSTANCE
-
Constructor Summary
Constructors Constructor Description DescriptionFormatter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringformat(Description d)Formats 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 Detail
-
INSTANCE
private static final DescriptionFormatter INSTANCE
-
-
Method Detail
-
instance
public static DescriptionFormatter instance()
Returns the singleton instance of this class.- Returns:
- the singleton instance of this class.
-
format
public java.lang.String format(Description d)
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.
-
-