doc / ch.tutteli.atrium.creating / Expect / addAssertionsCreatedBy

addAssertionsCreatedBy

abstract fun addAssertionsCreatedBy(assertionCreator: Expect<T>.() -> Unit): Expect<T> (source)
Deprecated: use _logic.appendAsGroup; will be removed with 0.18.0

Adds the assertions created by the assertionCreator lambda to this container and adds a failing assertion to this container in case the assertionCreator did not create a single assertion.

A failing assertion is added to the container since we assume that the user or assertion function writer did a mistake and forgot to add an assertion. This can happen if one only creates assertions without adding them to the container or if one simply let the lambda empty.

Parameters

assertionCreator - The receiver function which should create and add assertions to this container.

Return
an Expect for the subject of this expectation.