doc / ch.tutteli.atrium.creating / AssertionContainer / appendAsGroup


abstract fun appendAsGroup(assertionCreator: Expect<T>.() -> Unit): Expect<T> (source)

Appends the Assertions the given assertionCreator creates to this container and returns an Expect which includes them.

Whether the returned Expect is the same as the initial one is up to the implementation (i.e. if a mutable structure is used or an immutable). Atrium strives for an immutable data structure in the long run and will little by little refactor the code accordingly.


assertionCreator - The lambda which will create assertions.


AssertionError - Might throw an AssertionError in case Assertions are immediately evaluated.

an Expect for the subject of this expectation.