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
Support for java 8 Predicates #658
Comments
Good idea, I would just use |
@joel-costigliola I am willing to work on this if no one is. I already have some idea about how to do it. I just have one question, do we also need the other predicates ( |
@filiphr that would be great ! regarding your question I would say yes (we have the same thing with |
@filiphr do you prefer |
@joel-costigliola I think that accepts is more suitable in this situation. You are correct. |
|
While doing the changes to |
No, I think this will be confusing, if you assert that the predicate should accept a value and it does not then the problem is on the predicate not the value, I would use a message like:
where given is replaced by predicate description when provided. |
I will modify the error messages so it is better to understand. Will probably do something in the |
👍 |
Nice feature. I know discussion is over, but I just have to add my two c: I am used to the FunctionalInterfaces, so "accept" to automatically indicates a Consumer. Working with predicates I would expect "tests" (and doesNotTest). |
well if you write
|
or according to predicate's 'test' method it could be: |
I kind of like |
+1 for "isTrueFor" |
Summary
It would be nice to have support for java 8 predicates.
Assertions should allow for testing them instead of testing everyone separetly.
Real life use case / example
Good:
Not good:
Java 8 specific ?
YES
The text was updated successfully, but these errors were encountered: