|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pojomatic.test.AssertUtils
public class AssertUtils
This class is not meant to be a part of the public API.
Method Summary | |
---|---|
static void |
assertEquals(java.lang.String message,
java.lang.Object expected,
java.lang.Object actual)
Asserts that two objects are either both null or are equal according to Object.equals(Object) . |
static boolean |
equal(java.lang.Object first,
java.lang.Object second)
Determines if two objects are both null or are equal according to Object.equals(Object) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean equal(java.lang.Object first, java.lang.Object second)
Object.equals(Object)
.
first
- the first object to comparesecond
- the second object to compare
true
if both objects are null,
or first
is non-null and first.equals(second)
,
false
otherwiseObject.equals(Object)
public static void assertEquals(java.lang.String message, java.lang.Object expected, java.lang.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
- the message to add if the assertion failsexpected
- will be displayed first if the assertion failsactual
- will be displayed second if the assertion fails
java.lang.AssertionError
- if the objects are not equal. Throwable.getMessage()
will
include information about the differences
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |