doc / ch.tutteli.atrium / property

property

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

Creates an IAssertionPlant which immediately evaluates IAssertions using the given property as subject.

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

See Also

IAtriumFactory.newCheckImmediately

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

Creates an IAssertionPlant which lazily evaluates IAssertions using the given property as subject.

The given createAssertions function is called after the plant has been created. It could create IAssertions for the given property which are lazily evaluated by the newly created IAssertionPlant after the call to createAssertions is made.

Exceptions

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

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

See Also

IAtriumFactory.newCheckLazily