doc / ch.tutteli.atrium.domain.creating.collectors / AssertionCollector / collectForComposition

collectForComposition

abstract fun <T> collectForComposition(maybeSubject: Option<T>, assertionCreator: Expect<T>.() -> Unit): List<Assertion> (source)
Deprecated: Use collectForCompositionBasedOnSubject from atrium-logic; will be removed with 0.17.0

Use this function if you want to collect Assertions and use it as part of an AssertionGroup.

Parameters

maybeSubject - Either Some wrapping the subject of the current assertion or None in case a previous subject change was not successful - used as subject for the given assertionCreator.

assertionCreator - A lambda which defines the assertions for the feature.

Exceptions

IllegalArgumentException - in case the given assertionCreator did not create a single assertion.

Return
The collected assertions as a List<[Assertion]>.