mapbox / mapbox/mapbox-navigation-android
Test equals, hashCode and toString
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
For non-data classes that override equals, hashCode and toString it's easy to forget to update them when a new parameter is added. The similar problem exists for builders, but for builders there is a test (see `BuilderTest`).
It would be nice to have the same checks for said methods.
We could write them by ourselves or use some libs, for example: `nl.jqno.equalsverifier:equalsverifier`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing BuilderTest mentioned in the issue and inspect how non-data classes implement equals, hashCode, and toString. Evaluate whether equalsverifier or hand-written checks fit the project, then add checks that reveal when a newly added parameter is omitted from these methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100