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.

Return

an Expect for the subject of this expectation.

Parameters

assertionCreator

The lambda which will create assertions.

Throws

Might throw an AssertionError in case Assertions are immediately evaluated.