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

Added shouldBeEquivalentTo and shouldNotBeEquivalentTo functionality #184

Merged
merged 9 commits into from
Nov 14, 2020

Conversation

drcolombo
Copy link
Contributor

Description
Added shouldBeEquivalentTo and shouldNotBeEquivalentTo functionality instructing Kluent how to compare objects. By default it will do comparison by each and every non-private property instead of using equals() method.

  • You can define list of properties to include in comparison or to exclude some of them
  • For object hierarchies you can define how deep the level of recurrsion should be (the default value is 10)
  • For iterables you can define if you want to perform comparison keeping the same order or in any order

Checklist

  • [X ] I've added my name to the AUTHORS file, if it wasn't already present.

@drcolombo
Copy link
Contributor Author

Looks like only the project admin may run SonarCube analysis.

@MarkusAmshove
Copy link
Owner

Oh I didn't know that, I'll look if I can change the permissions.

I'll also review the changes later this week or at the weekend.
After our email conversation and my first look into the diff here I think I'm in favor of not touching the assertions that we already have and implement the new ones you already built 👍

@MarkusAmshove
Copy link
Owner

I had a look at the changes and assertions and I'm ready to merge 👍

Would you be willing to add a small documentation about the assertion (especially its options) in the docs/ folder? I think that would help the discovery of this cool assertion :-)

@drcolombo
Copy link
Contributor Author

Sure - will do it tomorrow.

@sonarcloud
Copy link

sonarcloud bot commented Nov 12, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 2 Code Smells

82.3% 82.3% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_272) you have used to run this analysis is deprecated and we will stop accepting it accepting it soon.Please update to at least Java 11.
Read more here

@drcolombo
Copy link
Contributor Author

Let me know if you have any concerns about the created documentation.

@MarkusAmshove MarkusAmshove merged commit 28d303b into MarkusAmshove:master Nov 14, 2020
@MarkusAmshove
Copy link
Owner

Thank you very much again :-) This is now released under v1.64 :-)

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

Successfully merging this pull request may close these issues.

2 participants