Fix : satisfies(AllOf.allOf(condition.....)) to indicate the false condition#3554
Closed
JunHyungJang wants to merge 3 commits intoassertj:3.xfrom
Closed
Fix : satisfies(AllOf.allOf(condition.....)) to indicate the false condition#3554JunHyungJang wants to merge 3 commits intoassertj:3.xfrom
JunHyungJang wants to merge 3 commits intoassertj:3.xfrom
Conversation
joel-costigliola
requested changes
Aug 1, 2024
Member
joel-costigliola
left a comment
There was a problem hiding this comment.
thanks for the PR, first round of comments :)
| import static org.assertj.core.api.AssertionsForClassTypes.assertThat; | ||
| import static org.assertj.core.api.BDDAssertions.then; | ||
|
|
||
| public class AbstractAssert_satisfiesAllOf_Test { |
Member
There was a problem hiding this comment.
Could you refactor that test so that it follows our contribution guidelines https://github.com/assertj/assertj/blob/3.x/CONTRIBUTING.md, especially the use of GIVEN WHEN THEN and AssertionUtil.expectAssertionError
| @Test | ||
| void should_fail_if_one_of_the_condition_is_not_met() { | ||
| Condition<String> condition1 = new Condition<>(text -> text != null, "Input not null"); | ||
| Condition<String> condition2 = new Condition<>(text -> text.equalsIgnoreCase("abc"), "Input not matching"); |
Member
There was a problem hiding this comment.
add another failing condition to show that all failing conditions are reported (and not the first failing)
Contributor
Author
|
Thank you for your first round of comments !
|
Member
|
Integrated thanks @JunHyungJang ! |
|
Nice work @JunHyungJang ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

AllOf should report which condition failed Report all failing conditions when using
satisfies(allOf(Condition...))#3537I fix the above issue by fixing satisfies.allOf(conditions...) to indicate that which condition is failed and passed
Please let me know, if I should do something more or something to fix
Thank you
Check List:
Fixes AllOf should report which condition failed #3537
Unit tests : YES
Javadoc with a code example (on API only) : YES
PR meets the contributing guidelines
Following the contributing guidelines will make it easier for us to review and accept your PR.