You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
I'm using JaVers to compare two objects in a test. I have some expected changes that I want to remove from the list of changes but ValueChange et. al. do not override the default hashCode/equals so I can't use convenient List methods like in change.removeAll(expectedChanges) after which I would assert that the list of changes is empty.
I took a look at ValueChange and some other concrete Change classes and from what I can tell GlobalId, Atomic, etc. all override the default hashCode/equals.
Can ValueChange et. al. be updated to also support structural equality instead of referential equality (default hashCode/equals)?
The text was updated successfully, but these errors were encountered:
I think ValueChange could implement equals and hashcode based on left and right values. Diff and all its child objects have to remain immutable. You can came up with a PR if you want.
I'm using JaVers to compare two objects in a test. I have some expected changes that I want to remove from the list of changes but
ValueChange
et. al. do not override the defaulthashCode
/equals
so I can't use convenientList
methods like inchange.removeAll(expectedChanges)
after which I would assert that the list of changes is empty.I took a look at
ValueChange
and some other concreteChange
classes and from what I can tellGlobalId
,Atomic
, etc. all override the defaulthashCode
/equals
.Can
ValueChange
et. al. be updated to also support structural equality instead of referential equality (defaulthashCode
/equals
)?The text was updated successfully, but these errors were encountered: