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

equals() and hashCode() methods are missing in classed provided by SDK #63

Open
kmichalak opened this issue Apr 11, 2018 · 2 comments
Open
Labels

Comments

@kmichalak
Copy link

General information

  • SDK/Library version: 2.27.2 and any previous version
  • Environment: N/A
  • Language, language version, and OS: Any version of Java and any OS

Issue description

Looks like equals() and hashCode() methods are not available for classes provided by SDK. It makes integration and unit testing much harder, as custom assertions/matchers are needed to check for example if com.braintreegateway.Trasanction instance contains all necessary data.
Currenlty to assert an object state I have to implement customer Hamcrest matcher, create long list of assertions (what is not the best idea from test design or good practices perspective) or use additional tools to perform reflection based comparison.
Adding implementation for equals() and hashCode() methods will simplify testing process.

@quinnjn
Copy link

quinnjn commented Apr 18, 2018

I agree that it would be nice to have these methods implemented.

We'll keep this in mind as we try out lombok (mentioned in #57) which looks like it is able to generate equals and hashCode methods.

@hollabaq86
Copy link
Contributor

for internal notekeeping, ticket 630

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

No branches or pull requests

3 participants