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

Matcher ScalarHasValue has to override describeMismatchSafely for better output #7

Closed
proshin-roman opened this issue May 12, 2018 · 19 comments
Labels
bug Something isn't working scope
Milestone

Comments

@proshin-roman
Copy link

This ticket is moved from yegor256/cactoos#816

Currently, ScalarHasValue doesn't override method describeMismatchSafely that leads to the next problem:

final ScalarHasValue<String> matcher =
    new ScalarHasValue<>(new IsEqual<>("expected"));
final Scalar<String> scalar = new UncheckedScalar<>(() -> "actual");
final StringDescription description = new StringDescription();
matcher.describeMismatch(scalar, description);
System.out.println(description.toString());
// the out is:
// was <org.cactoos.scalar.UncheckedScalar@368239c8>
// how it should look like:
// was "actual"

so it prints an actual version incorrectly: default toString method is called for the Scalar.

Expected:

  • the value of scalar is printed as an actual value of matching.

What should be fixed

  • class ScalarHasValue has to override method describeMismatchSafely and convert Scalar to String properly.
@0crat
Copy link
Collaborator

0crat commented May 12, 2018

@llorllale/z please, pay attention to this issue

@llorllale
Copy link
Owner

@0crat in

@llorllale llorllale added the bug Something isn't working label May 12, 2018
@0crat
Copy link
Collaborator

0crat commented May 12, 2018

@0crat in (here)

@llorllale Job #7 is now in scope, role is DEV

@0crat
Copy link
Collaborator

0crat commented May 12, 2018

Bug was reported, see §29: +15 point(s) just awarded to @proshin-roman/z

@0crat
Copy link
Collaborator

0crat commented May 16, 2018

The job #7 assigned to @victornoel/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this

@victornoel
Copy link
Collaborator

@llorllale should other matchers be improved as well?

@llorllale
Copy link
Owner

@victornoel sure. You can also leave puzzles for continuing work past budget

@victornoel
Copy link
Collaborator

@0crat waiting for #14

@0crat
Copy link
Collaborator

0crat commented May 19, 2018

@0crat waiting for #14 (here)

@victornoel The impediment for #7 was registered successfully by @victornoel/z

victornoel added a commit to victornoel/cactoos-matchers that referenced this issue May 28, 2018
victornoel added a commit to victornoel/cactoos-matchers that referenced this issue Jun 1, 2018
victornoel added a commit to victornoel/cactoos-matchers that referenced this issue Jun 1, 2018
@0pdd
Copy link
Collaborator

0pdd commented Jun 1, 2018

@proshin-roman the puzzle #20 is still not solved.

@victornoel
Copy link
Collaborator

@proshin-roman the MR #14 has been merged, this issue can now be closed :)

@0crat
Copy link
Collaborator

0crat commented Jun 2, 2018

@elenavolokhova/z please review this job completed by @victornoel/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed

@0crat
Copy link
Collaborator

0crat commented Jun 2, 2018

The job #7 is now out of scope

@elenavolokhova
Copy link

@0crat quality good

@0crat
Copy link
Collaborator

0crat commented Jun 4, 2018

Order was finished, quality is "good": +35 point(s) just awarded to @victornoel/z

@0crat
Copy link
Collaborator

0crat commented Jun 4, 2018

Quality review completed: +8 point(s) just awarded to @elenavolokhova/z

@0pdd
Copy link
Collaborator

0pdd commented Jan 27, 2019

@proshin-roman the only puzzle #20 is solved here.

@0pdd
Copy link
Collaborator

0pdd commented Jan 30, 2019

@proshin-roman the puzzle #20 is still not solved.

@0pdd
Copy link
Collaborator

0pdd commented Feb 14, 2021

@proshin-roman the puzzle #230 is still not solved; solved: #20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scope
Projects
None yet
Development

No branches or pull requests

6 participants