Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Java8Matcher where matcher argument returns a Matcher #16

Open
arian opened this issue Mar 12, 2019 · 0 comments
Open

Java8Matcher where matcher argument returns a Matcher #16

arian opened this issue Mar 12, 2019 · 0 comments

Comments

@arian
Copy link

arian commented Mar 12, 2019

Basic idea, add a method with the signature:

public static <I, O> Matcher<I> where(DescribableFunction<? super I, O> property, Function<I, Matcher<? super O>> matcher);

So you could write:

assertThat(someList, where(String::toUpperCase, str -> equalTo(str)));

my actual use case is a bit more complex than this.

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

No branches or pull requests

2 participants