|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
com.bm.utils.BeanEqualsTester
public final class BeanEqualsTester
Helper method to test the equality of beans.
Method Summary | ||
---|---|---|
static
|
testColletionsForEqual(java.util.Collection<? extends T> firstColl,
java.util.Collection<? extends T> secondColl)
Assert that the two collections are the same irrespective of order. |
|
static
|
testEqualsImplementationForEntityBeans(java.util.List<T> original,
java.util.List<T> readed)
Test the collection for equality by calling the equals method (if not equal a runntime excetion is thrown). |
|
static
|
testEqualsOnPersistentFields(java.util.List<T> original,
java.util.List<T> readed,
Introspector<T> intro)
Test the collection for equality on persistent fields (if not equal a runntime excetion is thrown). |
|
static
|
testEqualsOnSize(java.util.List<T> original,
java.util.List<T> readed)
Test the collection for the size (if not equal a runntime excetion is. |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> void testEqualsOnSize(java.util.List<T> original, java.util.List<T> readed)
T
- -
the type of the beanoriginal
- -
the original collsecion ob beansreaded
- -
the readed collection from the DBpublic static <T> void testEqualsOnPersistentFields(java.util.List<T> original, java.util.List<T> readed, Introspector<T> intro)
T
- -
the type of the beanoriginal
- -
the original collsecion ob beansreaded
- -
the readed collection from the DBintro
- -
the introspectorpublic static <T> void testColletionsForEqual(java.util.Collection<? extends T> firstColl, java.util.Collection<? extends T> secondColl)
T
- -
the type of the collectionfirstColl
- The first collectionsecondColl
- The second collectionpublic static <T> void testEqualsImplementationForEntityBeans(java.util.List<T> original, java.util.List<T> readed)
T
- -
the type of the beanoriginal
- -
the original collection ob beansreaded
- -
the readed collection from the DB
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |