Open SerVB opened 1 year ago
You can pass a custom display function when calling assertThat
ex:
assertThat(foo, displayActual = { myCustomRepresentation(it) })
this could probably be better documented.
Does this cover the use-cases you are envisioning?
Thanks for the answer. This looks not so convenient, though, to always pass the display function. It's better to just somehow specify globally.
Oh you mean specifically a global setting then? Extending how show()
works is something I've considered, but doing that in a way that's ergonomic and easy to understand is tricky.
Hi! I'm comparing assertk to assertj and bumped into innability to find a way to change representations in the assertions message (Assertions.useRepresentation).
Does it exist or is it not yet implemented?
IMO that is quite useful, and should be provided ootb.