collectForComposition
inline fun <T> AssertionContainer<T>.collectForComposition(noinline assertionCreator: Expect<T>.() -> Unit): List<Assertion>(source)
Use this function if you want to collect Assertions and use it as part of another Assertion (e.g. as part of an AssertionGroup).
Note that an assertion will be added which fails in case assertionCreator does not create a single assertion.
It uses the AssertionContainer.maybeSubject as subject of the given assertionCreator and delegates to collectForCompositionBasedOnSubject.
Return
The collected assertions as a List<[Assertion]>
.
Parameters
assertionCreator
A lambda which defines the expectations for the AssertionContainer.maybeSubject.