doc / ch.tutteli.atrium.domain.builders.creating / MetaFeatureOption / p

p

fun <R> p(property: KProperty0<R>): MetaFeature<R> (source)

Creates a MetaFeature for the given property property.

Notice for assertion function writers: you should use ExpectImpl.feature and pass a class reference instead of using this convenience function (e.g. ExpectImpl.feature(List<Int>::size)). This way we are always able to report the property, even if the subject is not defined which occurs if a previous transformation of the subject could not be carried out.