interface IAssertionPlant<out T : Any> : IAssertionPlantWithCommonFields<T> (source)
Represents a plant for IAssertions and offers the possibility to check all the added assertions.
You can think of it as an IAssertion factory which does more than just factoring but also provides quality assurance capabilities.
| and |
open val and: IAssertionPlant<T>
Can be used to separate assertions when using the fluent-style API. |
| commonFields |
abstract val commonFields: CommonFields<T>
CommonFields of this plant. |
| subject |
open val subject: T
The subject for which this plant will create/check IAssertions. |
| addAssertion |
abstract fun addAssertion(assertion: IAssertion): IAssertionPlant<T>
Adds the given assertion to the plant. |
| checkAssertions |
abstract fun checkAssertions(): IAssertionPlant<T>
Checks the so far added IAssertions and reports if one of them fails. |
| createAndAddAssertion |
abstract fun createAndAddAssertion(description: String, expected: Any, test: () -> Boolean): IAssertionPlant<T>
Creates an IAssertion based on description, expected and test and adds it to the plant. |
| createAssertionsAndCheckThem |
fun <T : Any> IAssertionPlant<T>.createAssertionsAndCheckThem(createAssertions: IAssertionPlant<T>.() -> Unit): IAssertionPlant<T>
Uses |