Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow filtering of events #20

Open
alechenninger opened this issue Nov 8, 2014 · 0 comments
Open

Allow filtering of events #20

alechenninger opened this issue Nov 8, 2014 · 0 comments

Comments

@alechenninger
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant