interface BaseCollectingAssertionPlant<out T, out A : BaseAssertionPlant<T, A>, out C : BaseCollectingAssertionPlant<T, A, C>> : BaseAssertionPlant<T, A>
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 reporting capabilities. It merely offers a method to getAssertions (the collected ones).
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.
abstract val subject: T
The subject for which this plant will create Assertions or it throws a PlantHasNoSubjectException if absent. |
open val maybeSubject: Option<T>
Either Some wrapping the subject of an Assertion or None in case a previous subject change could not be carried out. |
|
abstract val subjectProvider: () -> T
The provider which provides subject. |
abstract fun getAssertions(): List<Assertion>
|
abstract fun addAssertion(assertion: Assertion): A
Adds the given assertion to this plant. |
fun <T, A : BaseAssertionPlant<T, *>> A.asExpect(): Expect<T>
Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable. |
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. |
|
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. |