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

Change the description of assertion errors so that IntelliJ shows the "show difference" option in the console output. #12

Closed
DenEwout opened this issue Jul 20, 2016 · 7 comments

Comments

@DenEwout
Copy link

Hello,

Love using hamkrest! but I have one gripe with it. IntelliJ doesn't show the "show difference" option when an assertion fails. This is quite handy when you're asserting the contents of data classes.

A quick google shows that IntelliJ offers this functionality simply by checking a regular expression. Would it be possible to change the description strings so that IntelliJ shows the "show difference" option when using hamkrest?

Kind regards,

Ewout.

@DenEwout
Copy link
Author

Hi,

I haven't seen any activity on this issue, will this be considered later?

Kind regards,

Ewout.

@AndreasVolkmann
Copy link
Contributor

AndreasVolkmann commented Sep 3, 2016

Hi,

I just checked it out.

Adding support for the show difference option is really as easy as editing a few String values.

I have a branch where the functionality is implemented.

image

@DenEwout
Copy link
Author

DenEwout commented Sep 6, 2016

Would you mind creating a pull request for it? (or sharing your fork?)

@AndreasVolkmann
Copy link
Contributor

I think I need special permissions to create a pull request (idk).

Here is my fork:
https://github.com/goreRatzete/hamkrest

@DenEwout
Copy link
Author

DenEwout commented Sep 7, 2016

You don't need special permissions, I took the liberty and did it for you. (see: #13)

You can just go to your fork on github, and click create pull request. For a more complete guide you can check: https://help.github.com/articles/creating-a-pull-request/

Thanks for helping me out!

@npryce
Copy link
Owner

npryce commented Oct 16, 2016

PR merged

@npryce npryce closed this as completed Oct 16, 2016
@corbym
Copy link

corbym commented Nov 11, 2020

This seems to break for very long strings (or very long lists).. but perhaps isn't this code's fault. Not sure as it might be the IDE's problem.

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

No branches or pull requests

4 participants