|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbpm.test.assertion.QueryAssertions
public class QueryAssertions
Utility class with assertions for query test.
| Method Summary | ||
|---|---|---|
static
|
assertOrderIsNatural(java.lang.Class<T> clazz,
java.lang.String property,
java.util.List<T> listOrderedAsc,
java.util.List<T> listOrderedDesc,
int nrOfExpectedElements)
Does the same as the assertOrderOnProperty assertion, but instead of checking if the resulting list have the correct elements now it is checked if the elements are naturally ordered ascending and descending on the given property. |
|
static
|
assertOrderOnProperty(java.lang.Class<T> clazz,
java.lang.String property,
java.util.List<T> listOrderedAsc,
java.util.List<T> listOrderedDesc,
java.util.List<?> expectedValuesAsc)
Assertion to be used to check if the result of a certain XXXQuery produces the correct result. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> void assertOrderOnProperty(java.lang.Class<T> clazz,
java.lang.String property,
java.util.List<T> listOrderedAsc,
java.util.List<T> listOrderedDesc,
java.util.List<?> expectedValuesAsc)
T - The return type of the XXXQueryclazz - Due to generics mumbo-jumbo, it's required to provide the class
of the generic type T. If only we could do T.getClass() ...property - The property on which the query was orderedlistOrderedAsc - The list resulting from executing the query with an 'order by asc'listOrderedDesc - The list resulting from executing the query with an 'order by
desc'expectedValuesAsc - The hard coded list of expected elements, in ascending order. The
assertion for the descending case will be done by reversing this
list
public static <T> void assertOrderIsNatural(java.lang.Class<T> clazz,
java.lang.String property,
java.util.List<T> listOrderedAsc,
java.util.List<T> listOrderedDesc,
int nrOfExpectedElements)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||