With AssertJ you can say:
assertThat(list).satisfiesAnyOf(
listParam -> assertThat(listParam).contains(Tags.SWEETS, Tags.HIGH),
listParam -> assertThat(listParam).contains(Tags.SOUPS, Tags.RED)
);
How am I supposed to express the same with KoTest? Is there some meta-assertion which passes as soon as one of the internal assertions is successful?
You can use any, like:
any {
list.shouldContain(Tags.SWEETS, Tags.HIGH)
list.shouldContain(Tags.SOUPS, Tags.RED)
}
or you could create a composite matcher that tests for either of the tags:
list should contain(Tags.SWEETS, Tags.HIGH).or(contain(Tags.SOUPS, Tags.RED))