doc / ch.tutteli.atrium.api.cc.infix.en_GB / property

property

fun <T : Any, TProperty : Any> Assert<T>.property(property: KProperty0<TProperty>): AssertionPlant<TProperty> (source)
fun <T : Any, TProperty : Any> Assert<T>.property(property: KProperty1<T, TProperty>): AssertionPlant<TProperty> (source)

Creates an AssertionPlant for the given property which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the given property, to the current plant.

Return
An AssertionPlant for the given property.

fun <T : Any, TProperty : Any> CollectingAssertionPlant<T>.property(property: KProperty0<TProperty>): AssertionPlant<TProperty> (source)
Deprecated: Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`


fun <T : Any, TProperty : Any> CollectingAssertionPlant<T>.property(property: KProperty0<TProperty>, assertionCreator: Assert<TProperty>.() -> Unit): AssertionPlant<TProperty> (source)
Deprecated: Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`

fun <T : Any, TProperty : Any> Assert<T>.property(property: KProperty0<TProperty>, assertionCreator: Assert<TProperty>.() -> Unit): AssertionPlant<TProperty> (source)
fun <T : Any, TProperty : Any> Assert<T>.property(property: KProperty1<T, TProperty>, assertionCreator: Assert<TProperty>.() -> Unit): AssertionPlant<TProperty> (source)

Creates an AssertionPlant for the given property which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the given property, to the current plant -- starting with a group consisting of the Assertions created by the assertionCreator lambda.

Exceptions

AssertionError - Might throw an AssertionError if an additionally created Assertion (by calling assertionCreator) does not hold.

Return
An AssertionPlant for the given property.