| Modifier and Type | Method and Description |
|---|---|
Representation |
WritableAssertionInfo.representation() |
Representation |
AssertionInfo.representation() |
| Modifier and Type | Method and Description |
|---|---|
static void |
AbstractAssert.setCustomRepresentation(Representation customRepresentation) |
void |
WritableAssertionInfo.useRepresentation(Representation newRepresentation) |
default void |
WithAssertions.useRepresentation(Representation customRepresentation)
Register a
Representation that will be used in all following assertions. |
static void |
BDDAssertions.useRepresentation(Representation customRepresentation)
Register a
Representation that will be used in all following assertions. |
static void |
Assertions.useRepresentation(Representation customRepresentation)
Use the given
Representation in all remaining tests assertions. |
SELF |
Assert.withRepresentation(Representation representation)
Use the given
Representation to describe/represent values in AssertJ error messages. |
SELF |
AbstractAssert.withRepresentation(Representation representation)
Use the given
Representation to describe/represent values in AssertJ error messages. |
| Constructor and Description |
|---|
WritableAssertionInfo(Representation customRepresentation) |
| Modifier and Type | Method and Description |
|---|---|
String |
RecursiveComparisonConfiguration.multiLineDescription(Representation representation) |
String |
ComparisonKeyDifference.multiLineDescription(Representation representation) |
String |
ComparisonDifference.multiLineDescription(Representation representation) |
| Modifier and Type | Method and Description |
|---|---|
Representation |
ConfigurationProvider.representation()
Returns the
Representation that AssertJ will use, which is taken first from:
the representation returned by a custom Configuration through Configuration.representation() but only if it is different from the StandardRepresentation
the Representation with highest priority loaded from the classpath by the ServiceLoader
If no custom representation was registered or overridden in a specific Configuration, the StandardRepresentation is used. |
Representation |
Configuration.representation() |
| Modifier and Type | Method and Description |
|---|---|
AssertionError |
AssertionErrorCreator.assertionError(String message,
Object actual,
Object expected,
Representation representation) |
String |
ErrorMessageFactory.create(Description d,
Representation p)
Creates a new error message as a result of a failed assertion.
|
String |
BasicErrorMessageFactory.create(Description d,
Representation representation)
Creates a new error message as a result of a failed assertion.
|
String |
AbstractShouldHaveTextContent.create(Description d,
Representation representation) |
protected String |
ShouldBeEqual.defaultDetailedErrorMessage(Description description,
Representation representation)
Builds and returns an error message from description using
ShouldBeEqual.detailedExpected() and
ShouldBeEqual.detailedActual() detailed representation. |
String |
MessageFormatter.format(Description d,
Representation p,
String format,
Object... args)
Interprets a printf-style format
String for failed assertion messages. |
AssertionError |
ShouldBeEqual.newAssertionError(Description description,
Representation representation)
Creates an
indicating that an assertion that verifies that two objects are
equal failed.The message is built so that it differentiates ShouldBeEqual.actual and
ShouldBeEqual.expected description in case their string representation are the same (like 42 float and 42 double). |
AssertionError |
AssertionErrorFactory.newAssertionError(Description description,
Representation representation)
Creates an
. |
static AssertionErrorFactory |
ShouldBeEqual.shouldBeEqual(Object actual,
Object expected,
ComparisonStrategy comparisonStrategy,
Representation representation)
Creates a new
. |
static AssertionErrorFactory |
ShouldBeEqual.shouldBeEqual(Object actual,
Object expected,
Representation representation)
Creates a new
. |
static ErrorMessageFactory |
ShouldBeEqualByComparingFieldByFieldRecursively.shouldBeEqualByComparingFieldByFieldRecursive(Object actual,
Object other,
List<DeepDifference.Difference> differences,
Representation representation) |
static ErrorMessageFactory |
ShouldBeEqualByComparingFieldByFieldRecursively.shouldBeEqualByComparingFieldByFieldRecursively(Object actual,
Object other,
List<ComparisonDifference> differences,
RecursiveComparisonConfiguration recursiveComparisonConfiguration,
Representation representation) |
static <K,V> ErrorMessageFactory |
ShouldContainEntries.shouldContainEntries(Map<? extends K,? extends V> actual,
Map.Entry<? extends K,? extends V>[] expectedEntries,
Set<Map.Entry<? extends K,? extends V>> entriesWithWrongValue,
Set<Map.Entry<? extends K,? extends V>> entriesWithKeyNotFound,
Representation representation) |
static ErrorMessageFactory |
ShouldNotBeEqualComparingFieldByFieldRecursively.shouldNotBeEqualComparingFieldByFieldRecursively(Object actual,
Object other,
RecursiveComparisonConfiguration recursiveComparisonConfiguration,
Representation representation) |
protected String |
ShouldBeEqual.smartErrorMessage(Description description,
Representation representation)
Builds and returns an error message from the given description using
ShouldBeEqual.expected and ShouldBeEqual.actual basic
representation if their description differ otherwise use
ShouldBeEqual.defaultDetailedErrorMessage(Description, Representation) to represent them differently. |
| Constructor and Description |
|---|
ShouldBeEqual(Object actual,
Object expected,
ComparisonStrategy comparisonStrategy,
Representation representation) |
| Constructor and Description |
|---|
UnambiguousRepresentation(Representation representation,
Object actual,
Object expected) |
| Modifier and Type | Class and Description |
|---|---|
class |
BinaryRepresentation
Binary object representation instead of standard java representation.
|
class |
CompositeRepresentation |
class |
HexadecimalRepresentation
Hexadecimal object representation instead of standard java representation.
|
class |
StandardRepresentation
Standard java object representation.
|
class |
UnicodeRepresentation
Unicode object representation instead of standard java representation.
|
| Modifier and Type | Method and Description |
|---|---|
List<Representation> |
CompositeRepresentation.getAllRepresentationsOrderedByPriority() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
HexadecimalRepresentation.toStringOf(Representation representation,
String s) |
protected String |
BinaryRepresentation.toStringOf(Representation representation,
String s) |
| Constructor and Description |
|---|
CompositeRepresentation(List<Representation> representations) |
| Modifier and Type | Method and Description |
|---|---|
static String |
Maps.format(Representation p,
Map<?,?> map)
Deprecated.
use
StandardRepresentation.toStringOf(Map) instead. |
Copyright © 2025. All rights reserved.