Essentially, a "where" clause...
Event<Integer> thingToHappen = //...
expect(thingToHappen)
.where(i -> i >= 0)
.waitUpTo(10, SECONDS);
This is really easy to add until you consider FailEvents. Unfortunately, the semantics start to break down because fail events generic types are ignored when chained together with other events. This makes sense because fail events never return a value; they either throw an exception if they occur, or they return null after the timeout.
Essentially, a "where" clause...
This is really easy to add until you consider
FailEvents. Unfortunately, the semantics start to break down because fail events generic types are ignored when chained together with other events. This makes sense because fail events never return a value; they either throw an exception if they occur, or they return null after the timeout.