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.p - the Representation usedformat - the format string.args - arguments referenced by the format specifiers in the format string.String.NullPointerException - if the format string is null.Copyright © 2014–2019 AssertJ. All rights reserved.