-
-
Notifications
You must be signed in to change notification settings - Fork 701
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 flatExtracting for map #1034
Comments
Hello there, i am looking at this. |
@joel-costigliola This looks pretty sweet. However this would not let you check all unique elements if I understand correctly, no?
then applying flatExtracting on A::names I cannot check that it contains exactly ["foo", "bar"] can I? |
|
@PascalSchumacher |
Not sure if I understand you correctly, but if you want to check all unique elements you can use: String[] abc = {"a", "a", "b"};
assertThat(abc).containsOnly("a", "b") |
Summary
Iterable
assertions provideflatMap
extraction but map assertions don't, it was suggested in:https://stackoverflow.com/questions/45081542/assertj-flatmap-list-of-lists-after-calling-extracting
Example
Java 8 specific ?
The text was updated successfully, but these errors were encountered: