public class MessageFormatter extends Object
Modifier and Type | Method and Description |
---|---|
String |
format(Description d,
Representation p,
String format,
Object... args)
Interprets a printf-style format
String for failed assertion messages. |
static MessageFormatter |
instance() |
public static MessageFormatter instance()
public String format(Description d, Representation p, String format, Object... args)
String
for failed assertion messages. It is similar to
String.format(String, Object...)
, except for:
Description
is used as the first argument referenced in the format
stringString
by invoking
Representation.toStringOf(Object)
.
d
- the description of the failed assertion, may be null
.format
- the format string.args
- arguments referenced by the format specifiers in the format string.String
.NullPointerException
- if the format string is null
.Copyright © 2013–2018 AssertJ. All rights reserved.