doc / ch.tutteli.atrium.core / CoreFactory / newReportingPlantNullable

newReportingPlantNullable

open fun <T> newReportingPlantNullable(assertionVerb: Translatable, subjectProvider: () -> T, reporter: Reporter, nullRepresentation: Any = RawString.NULL): ReportingAssertionPlantNullable<T> (source)
Deprecated: Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0\"

Creates a ReportingAssertionPlantNullable which is the entry point for assertions about nullable types.

It creates a newThrowingAssertionChecker based on the given reporter for assertion checking, uses subjectProvider as ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider but also as ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider. Notice that evalOnce is applied to the given subjectProvider to avoid side effects (the provider is most likely called more than once).

Notice, this method will be moved to CoreFactoryCommon with 1.0.0.

Parameters

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

subjectProvider - Used as ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider but also as ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider.

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

Return
The newly created assertion plant.

open fun <T> newReportingPlantNullable(assertionVerb: Translatable, subjectProvider: () -> T, assertionChecker: AssertionChecker, nullRepresentation: Any = RawString.NULL): ReportingAssertionPlantNullable<T> (source)
Deprecated: Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0\"

Creates a ReportingAssertionPlantNullable which is the entry point for assertions about nullable types.

It uses the given assertionChecker for assertion checking, uses subjectProvider as ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider but also as ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider. Notice that evalOnce is applied to the given subjectProvider to avoid side effects (the provider is most likely called more than once).

Notice, this method will be moved to CoreFactoryCommon with 1.0.0.

Parameters

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

subjectProvider - Used as ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider but also as ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider.

assertionChecker - The checker which will be used to check Assertions. (see ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.assertionChecker).

Return
The newly created assertion plant.