doc / ch.tutteli.atrium.assertions.builders / AssertionBuilder / summary

summary

abstract val summary: AssertionGroupDescriptionAndEmptyRepresentationOption<SummaryAssertionGroupType, AssertionsOption<SummaryAssertionGroupType, BasicAssertionGroupFinalStep>> (source)

Builder to create an AssertionGroup with a SummaryAssertionGroupType -- use it if it is essential that also Assertions which hold are shown to a user in error reporting. This kind is inter alia used for Iterable contains assertions where it quickly gets confusing if you do not see the assertions which hold.

For example, hamcrest has this problem; if you write the following using hamcrest:

assertThat(listOf(1,1), IsIterableContainingInOrder.contains(1))

it will complain that you expected 1 but it did not match 1. If you could see that it actually matched the first 1 and only did not match the second 1, then it would be clear from the beginning.