chiming in on previous topic (matcher for element ...
# kotlintest
t
chiming in on previous topic (matcher for element in a collection). I usually use map to convert into custom data classes, kotlin makes it not that much verbose, like
toTest.map { DataSupport(it.field1, it.field2) } should...
, but I like the approach from assertj extracting too: they create a list of Tuples you can compare, http://joel-costigliola.github.io/assertj/core-8/api/index.html. though I feel I see this one as a nice solution due to some luck of kotlin knowledge. also, both approaches don't work for real matchers, like when one of the field is a date an you just want to check whether the date is before/after a fixed one