doc / ch.tutteli.atrium.creating / BaseCollectingAssertionPlant

BaseCollectingAssertionPlant

interface BaseCollectingAssertionPlant<out T, out A : BaseAssertionPlant<T, A>, out C : BaseCollectingAssertionPlant<T, A, C>> : BaseAssertionPlant<T, A> (source)

Represents a BaseAssertionPlant which is intended to serve as receiver object for lambdas which create Assertions, in which this assertion plant collects the so created assertions.

In contrast to BaseReportingAssertionPlant, this plant does not offer error reporting capabilities. It merely offers a method to getAssertions (the collected ones).

Parameters

T - The type of the subject of this plant.

A - A subtype of BaseAssertionPlant -- has to correspond to A in C

C - A subtype of BaseCollectingAssertionPlant which is used in the fluent style API and as self type.

Properties

subject

abstract val subject: T

The subject for which this plant will create Assertions or it throws a PlantHasNoSubjectException if absent.

Inherited Properties

subjectProvider

abstract val subjectProvider: () -> T

The provider which provides subject.

Functions

getAssertions

abstract fun getAssertions(): List<Assertion>

Returns the Assertions which have been added to this plant.

Inherited Functions

addAssertion

abstract fun addAssertion(assertion: Assertion): A

Adds the given assertion to this plant.

Inheritors

CollectingAssertionPlant

interface CollectingAssertionPlant<out T : Any> : AssertionPlant<T>, BaseCollectingAssertionPlant<T, AssertionPlant<T>, CollectingAssertionPlant<T>>

Represents an AssertionPlant which is intended to serve as receiver object for lambdas which create Assertions, in which this assertion plant collects the so created assertions.

CollectingAssertionPlantNullable

interface CollectingAssertionPlantNullable<out T> : AssertionPlantNullable<T>, BaseCollectingAssertionPlant<T, AssertionPlantNullable<T>, CollectingAssertionPlantNullable<T>>

Represents an AssertionPlantNullable which is intended to serve as receiver object for lambdas which create Assertions, in which this assertion plant collects the so created assertions.