open fun addAssertionsCreatedBy(assertionCreator: Expect<T>.() -> Unit): Expect<T>
(source)
Overrides Expect.addAssertionsCreatedBy
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.
assertionCreator
- The receiver function which should create and add assertions to this container.
Return
an Expect for the subject of this
expectation.