Modifier and Type | Method | Description |
---|---|---|
static void |
assertEqualsWithDiff(Object actual,
Object expected) |
Asserts that two objects are either both null or are equal according to
Object.equals(Object) . |
static void |
assertEqualsWithDiff(Object actual,
Object expected,
String message) |
Asserts that two objects are either both null or are equal according to
Object.equals(Object) . |
public static void assertEqualsWithDiff(Object actual, Object expected)
Object.equals(Object)
. If not, an AssertionError
is thrown. If the objects are
not equal, but the types of two objects are compatible for equality, then the differences as
determined by Pojomatic.diff(Object, Object)
are included in the failure message.expected
- the expected objectactual
- the object which should be tested to equal the expected objectAssertionError
- if the objects are not equal, with details of the differences
included in the messageassertEqualsWithDiff(Object, Object, String)
public static void assertEqualsWithDiff(Object actual, Object expected, String message)
Object.equals(Object)
. If not, an AssertionError
is thrown. If the objects are
not equal, but the types of two objects are compatible for equality, then the differences as
determined by Pojomatic.diff(Object, Object)
are included in the failure message.expected
- the expected objectactual
- the object which should be tested to equal the expected objectmessage
- an optional message provided along with the diff if the objects are not equalAssertionError
- if the objects are not equal, with details of the differences
included in the messageCopyright © 2008–2018. All rights reserved.