assertj-db icon indicating copy to clipboard operation
assertj-db copied to clipboard

Add toString() and equals() implementations for core domain types (Table, Row, Value, Column)

Open bekoenig opened this issue 2 months ago • 1 comments

Hi,

for many relevant domain types like

  • Table
  • Row
  • Value
  • Column

there are currently no implementations of toString() and equals() (and, by implication, hashCode()). This is a significant blocker for making reliable assertions across different datasets and hinders test readability and diagnostics.

My current workaround is:

Assertions.assertThat(actualRows)
  .usingElementComparator(new CustomRowComparator())
  .withRepresentation(new CustomRowRepresentation())
  .containsExactlyInAnyOrderElementsOf(expectedRows);

I would like to contribute a fix by adding consistent equals(), hashCode(), and toString() implementations for the classes above.

bekoenig avatar Dec 04 '25 08:12 bekoenig

Hi @bekoenig , Thanks a lot for your feedback.

Of course I'll be happy to consider your request. Can you just send me a snippet a little bit more complete of your use case? Just to help me to define the best way to approch that.

VanRoy avatar Dec 11 '25 19:12 VanRoy