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

Add support for predicates to IterableSubject #178

Closed
BlackHC opened this issue Apr 14, 2015 · 3 comments
Closed

Add support for predicates to IterableSubject #178

BlackHC opened this issue Apr 14, 2015 · 3 comments

Comments

@BlackHC
Copy link

BlackHC commented Apr 14, 2015

It would be nice if there was a way to test predicates on elements of a collection.
assertThat(myList).hasSomeWith(myPredicate); (for an any predicate test), and
assertThat(myList).hasEveryWith(myPredicate); (for an every predicate test).

@kluever
Copy link
Member

kluever commented Apr 14, 2015

Will discuss @ API review...thanks for the idea!

@jonas-l
Copy link

jonas-l commented Jun 17, 2015

Categorically testing the contents of collections provides an example on how to achieve hasEveryWith which in your case would be something like assert_().in(myList).thatEach(predicateType).someCheckOnSubject();, however I couldn't find how to do hasSomeWith thus created #188.

@cpovirk
Copy link
Member

cpovirk commented Oct 5, 2015

This is unfair of me for multiple reasons, but I'm going to close this out in favor of #206 to consolidate the discussion.

@cpovirk cpovirk closed this as completed Oct 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants