public class PojomaticAssert extends Object
Assert
Modifier and Type | Method | Description |
---|---|---|
static void |
assertEqualsWithDiff(Object expected,
Object actual) |
Asserts that two objects are either both null or are equal according to
Object.equals(Object) . |
static void |
assertEqualsWithDiff(String message,
Object expected,
Object actual) |
Asserts that two objects are either both null or are equal according to
Object.equals(Object) . |
public static void assertEqualsWithDiff(Object expected, Object actual)
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.assertEqualsWithDiff(String, Object, Object)
public static void assertEqualsWithDiff(String message, Object expected, Object actual)
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.message
- a message (possibly null
) to include at the beginning of the
AssertionError
message.expected
- the expected objectactual
- the object which should be tested to equal the expected objectAssertionError
- if the objects are not equal.Copyright © 2008–2018. All rights reserved.