doc / ch.tutteli.atrium.domain.builders.creating / NewFeatureAssertionsBuilder / extractor

extractor

inline fun <T> extractor(originalAssertionContainer: Expect<T>): FeatureExtractorBuilder.DescriptionStep<T>

Start a feature extraction with the help of the FeatureExtractorBuilder.

In case you do not want to extract a feature (e.g. get the first element of a List) but merely want to transform the subject into another representation (e.g. down-cast Person to Student or transform a Sequence into a List) then you should use ExpectImpl.changeSubject instead.

Also, if the extraction of the feature is always safe, then you can just use one of the fN functions (e.g. f1 for a function expecting 1 argument) or property.