doc / ch.tutteli.atrium.creating / ReportingAssertionContainer / AssertionCheckerDecorator

AssertionCheckerDecorator

interface AssertionCheckerDecorator<T>

Represents a decorator for AssertionChecker which passes a specified assertion verb, representation and assertions to AssertionChecker.check for the given maybeSubject.

Parameters

T - The type of the maybeSubject.

Properties

assertionChecker

abstract val assertionChecker: AssertionChecker

The AssertionChecker which shall be used for checking the assertions.

assertionVerb

abstract val assertionVerb: Translatable

maybeSubject

abstract val maybeSubject: Option<T>

Either Some wrapping the subject of the current assertion or None in case a previous subject change was not successful.

representation

abstract val representation: Any?

Functions

check

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

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

Companion Object Functions

create

fun <T> create(assertionVerb: Translatable, maybeSubject: Option<T>, representation: Any?, assertionChecker: AssertionChecker): ReportingAssertionContainer.AssertionCheckerDecorator<T>

Creates an AssertionCheckerDecorator.