interface BaseAssertionPlant<out T, out A : BaseAssertionPlant<T, A>> : SubjectProvider<T>
Represents a plant for Assertions and offers methods to addAssertions to this plant.
It defines what AssertionPlant and AssertionPlantNullable have in common. However it is typically not used as
entry point for assertion functions. Most of the time you want to define an assertion function for AssertionPlant,
Assert respectively (Assert is a typealias
of AssertionPlant).
T
- The type of the subject of this BaseAssertionPlant.
A
- A subtype of BaseAssertionPlant which is used in the fluent style API and as self type.
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 val
The subject of an Assertion -- deprecated, will be removed with 1.0.0. |
abstract fun addAssertion(assertion: Assertion): A
Adds the given assertion to this plant. |
fun <T, A : BaseAssertionPlant<T, *>> A.asExpect(): Expect<T> fun <T : Any, A : BaseAssertionPlant<T, *>> A.asExpect(assertionCreator: Expect<T>.() -> Unit): A
Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable. |
interface AssertionPlant<out T : Any> : BaseAssertionPlant<T, AssertionPlant<T>>
Represents a plant for Assertions based on a non nullable subject. |
|
interface AssertionPlantNullable<out T> : BaseAssertionPlant<T, AssertionPlantNullable<T>>
Represents an assertion plant for nullable types. |
|
interface
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. |
|
interface
Represents a plant for Assertions and offers methods to addAssertions to this plant. |