public class TaskOrderSpecs
extends java.lang.Object
Provides common assertions for querying task order.
An 'any' rule asserts that all of the specified tasks occur in any order.
any(':a', ':b', ':c') would match on any permutation of ':a', ':b', ':c'.
An 'exact' rule asserts that all of the specified tasks occur in the order
provided. Note that other tasks may appear - it only verifies that the
given tasks occur in order.
exact(':b', ':d') would match on [ ':b', ':d' ] or say [ ':a', ':b', ':c', ':d' ]
Assertions can also be nested:
exact(':a', any(':b', ':c'), ':d') would match any of the following:
- [ ':a', ':b', ':c', ':d' ]
- [ ':a', ':c', ':b', ':d' ]
but not
- [ ':b', ':a', ':c', ':d' ]
Similarly, an exact rule can be nested inside of an any rule:
any(':a', exact(':b', ':c)) would match any of the following:
- [ ':a', ':b', ':c' ]
- [ ':b', ':c', ':a' ]
- [ ':b', ':a', ':c' ]
but not
- [ ':c', ':a', ':b' ]
- [ ':a', ':c', ':b' ]
or any other combination where :c occurs before :b