doc / ch.tutteli.atrium / IAtriumFactory / newReportingPlantAndAddAssertionsCreatedBy

newReportingPlantAndAddAssertionsCreatedBy

open fun <T : Any> newReportingPlantAndAddAssertionsCreatedBy(assertionVerb: Translatable, subject: T, reporter: Reporter, assertionCreator: AssertionPlant<T>.() -> Unit): AssertionPlant<T> (source)
Deprecated: Use AssertImpl.coreFactory instead; will be removed with 1.0.0

Creates a ReportingAssertionPlant which AssertionPlant.addAssertionsCreatedBy the given assertionCreator lambda where the created Assertions are added as a group and usually (depending on the configured Reporter) reported as a whole.

It creates a IAtriumFactory.newThrowingAssertionChecker based on the given reporter for assertion checking.

Parameters

assertionVerb - The assertion verb which will be used inter alia in reporting (see AssertionPlantWithCommonFields.CommonFields.assertionVerb).

subject - The subject for which this plant will create/check Assertions. (see BaseAssertionPlant.subject).

reporter - The reporter which will be used for a newThrowingAssertionChecker.

assertionCreator - The

Exceptions

AssertionError - The newly created AssertionPlant might throw an AssertionError in case a created Assertion does not hold.

Return
The newly created AssertionPlant which can be used to postulate further assertions.