doc / ch.tutteli.atrium.creating / AssertionPlantWithCommonFields / CommonFields

CommonFields

class CommonFields<out T> (source)

Common fields of an assertion plant.

Parameters

T - The type of the AssertionPlant.subject.

Constructors

<init>

CommonFields(assertionVerb: Translatable, subject: T, assertionChecker: AssertionChecker, nullRepresentation: Any)
CommonFields(assertionVerb: Translatable, subjectProvider: () -> T, representationProvider: () -> Any?, assertionChecker: AssertionChecker, nullRepresentation: Any)

Properties

assertionChecker

val assertionChecker: AssertionChecker

The checker which will be used to check Assertions.

assertionVerb

val assertionVerb: Translatable

The assertion verb which will be used inter alia in error reporting.

subjectProvider

val subjectProvider: () -> T

Provides the AssertionPlant.subject for which this plant will create/check Assertions.

Functions

check

fun check(assertions: List<Assertion>): Unit

Uses assertionChecker to check the given assertions (see AssertionChecker.check).