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

Provide assertion for Java8 predicates #689

Closed
jangalinski opened this issue Jun 16, 2016 · 2 comments
Closed

Provide assertion for Java8 predicates #689

jangalinski opened this issue Jun 16, 2016 · 2 comments

Comments

@jangalinski
Copy link

Summary

I want to simply assert the behavior of a predicate without evaluating it first

Example

// given some Predicate

Predicate<String> startsWithA = s -> s.startsWith("a");

// instead of
assertThat(startsWithA.test("abc")).isTrue();

// I want to write
assertThat(startsWithA).isTrueFor("abc");

Java 8 specific ?

  • YES : create Pull Request from the master branch

Remark: looks like a minor change and I would be happy tp provide the PR. Just let me know what you think (or if this is already possible somehow and I missed it).

@filiphr
Copy link
Contributor

filiphr commented Jun 16, 2016

This is already implemented. See #658.

It should come out in the next release.

@jangalinski
Copy link
Author

jangalinski commented Jun 16, 2016

Cool, thanks. closing this one then.

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

2 participants