|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pojomatic.testng.PojomaticAssert
public class PojomaticAssert
Pojomatic-related TestNG-style assertion methods useful for writing tests.
Assert
Method Summary | |
---|---|
static void |
assertEqualsWithDiff(java.lang.Object actual,
java.lang.Object expected)
Asserts that two objects are either both null or are equal according to Object.equals(Object) . |
static void |
assertEqualsWithDiff(java.lang.Object actual,
java.lang.Object expected,
java.lang.String message)
Asserts that two objects are either 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 void assertEqualsWithDiff(java.lang.Object actual, java.lang.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 object
java.lang.AssertionError
- if the objects are not equal, with details of the differences
included in the messageassertEqualsWithDiff(Object, Object, String)
public static void assertEqualsWithDiff(java.lang.Object actual, java.lang.Object expected, java.lang.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 equal
java.lang.AssertionError
- if the objects are not equal, with details of the differences
included in the message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |