Not necessarily I would say, it depends on the foc...
# atrium
r
Not necessarily I would say, it depends on the focus of your test. If you want to know that the order in the list is correct, then I would go with
contains.inOrder.only
and then you are probably interested which entry was wrong and then it makes sense that you see each position (that's at least my opinion). If your focus is on the Comparator as such, then I would not apply the comparator to a list but make assertions about using
compare
. So it would look more like:
assert(comparator.compare(A, B)).isLessThan(0)
in case A is less than B in your comparator