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

CommonFields

data class CommonFields<out T> (source)

Common fields of an assertion plant.

Constructors

<init> CommonFields(assertionVerb: String, subject: T, assertionChecker: IAssertionChecker)

Properties

assertionChecker val assertionChecker: IAssertionChecker

The checker which will be used to check IAssertions.

assertionVerb val assertionVerb: String

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

subject val subject: T

The subject for which this plant will create/check IAssertions.

Functions

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

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

fail fun fail(assertion: IAssertion): Unit

Uses assertionChecker to report a failing assertion (see IAssertionChecker.fail).