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
(#160) Improve messages in Assertion and Mismatches #231
Conversation
Codecov Report
@@ Coverage Diff @@
## master #231 +/- ##
============================================
+ Coverage 98.86% 98.91% +0.05%
Complexity 147 147
============================================
Files 28 28
Lines 352 370 +18
Branches 7 7
============================================
+ Hits 348 366 +18
Misses 4 4
Continue to review full report at Codecov.
|
@0crat status |
@victornoel This is what I know about this job in C63314D6Z, as in §32:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@victornoel Please, see comments below.
new Assertion<>( | ||
"Must fail to mismatch", | ||
new Mismatches<>(new TextOf("a"), new TextOf("expected")), | ||
"Must mismatches", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@victornoel Must mismatch
without es
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baudoliver7 arg, again :) thx!
"describes the matcher", | ||
description.toString(), | ||
new IsEqual<>("\nExpected: Text with value \"e\"\n but was: Text with value \"e\"") | ||
"Must mismatches", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@victornoel Must mismatch
without es
.
"no description when mismatches with right message", | ||
description.toString(), | ||
new IsEqual<>("") | ||
"Must mismatches", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@victornoel Must mismatch
without es
.
@@ -65,7 +65,9 @@ public HasValues(final Iterable<X> expected) { | |||
actual -> new ListOf<>(actual).containsAll(new ListOf<>(expected)), | |||
desc -> desc.appendText("contains ") | |||
.appendValue(new TextOf(expected)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@victornoel Could you change .appendValue(new TextOf(expected))
to .appendValue(expected)
as you did below ? I think that we do not need to use new TextOf(...)
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baudoliver7 good find, and I looked around and didn't find any similar thing in the codebase too :)
110d404
to
e3590a9
Compare
@baudoliver7 it should be ok now |
@victornoel Thanks, it's ok for me :) |
@rultor merge |
@victornoel OK, I'll try to merge now. You can check the progress of the merge here |
@victornoel Done! FYI, the full log is here (took me 8min) |
@sereshqua/z please review this job completed by @baudoliver7/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed |
@0crat quality good |
This is for #160. I tried to cleanup a bit how Assertion and Mismatches behave and so that it's consistent with all the matchers.