doc / ch.tutteli.atrium.api.cc.en_UK / property

property

fun <T : Any, TProperty : Any> IAssertionPlant<T>.property(property: KProperty0<TProperty>): IAssertionPlant<TProperty>

Creates an IAssertionPlant for the given property which eventually adds IAssertionGroups with a IFeatureAssertionGroupType, containing the assertions created for the given property, to the current plant.

Return
An IAssertionPlant for the given property, using an AtriumFactory.newFeatureAssertionChecker.

fun <T : Any, TProperty : Any> IAssertionPlant<T>.property(property: KProperty0<TProperty>, assertionCreator: IAssertionPlant<TProperty>.() -> Unit): IAssertionPlant<TProperty>

Creates an IAssertionPlant for the given property which eventually adds IAssertionGroups with a IFeatureAssertionGroupType, containing the assertions created for the given property, to the current plant -- starting with a group consisting of the IAssertions created by the assertionCreator lambda.

Exceptions

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

Return
An IAssertionPlant for the given property, using an AtriumFactory.newFeatureAssertionChecker.