public class BasicErrorMessageFactory extends Object implements ErrorMessageFactory
Modifier and Type | Field and Description |
---|---|
protected Object[] |
arguments |
protected String |
format |
Constructor and Description |
---|
BasicErrorMessageFactory(String format,
Object... arguments)
Creates a new
. |
Modifier and Type | Method and Description |
---|---|
String |
create()
Creates a new error message as a result of a failed assertion without description.
|
String |
create(Description d)
Creates a new error message as a result of a failed assertion with
StandardRepresentation . |
String |
create(Description d,
Representation representation)
Creates a new error message as a result of a failed assertion.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString() |
protected static CharSequence |
unquotedString(String string)
Return a string who will be unquoted in message format (without '')
|
public BasicErrorMessageFactory(String format, Object... arguments)
BasicErrorMessageFactory
.format
- the format string.arguments
- arguments referenced by the format specifiers in the format string.public String create(Description d, Representation representation)
create
in interface ErrorMessageFactory
d
- the description of the failed assertion.representation
- the representation usedpublic String create(Description d)
StandardRepresentation
.create
in interface ErrorMessageFactory
d
- the description of the failed assertion.public String create()
create
in interface ErrorMessageFactory
protected static CharSequence unquotedString(String string)
string
- the string who will be unquoted.Copyright © 2014–2019 AssertJ. All rights reserved.