doc / ch.tutteli.atrium.domain.builders.creating.changers / FeatureExtractorBuilder / FeatureExtractionStep

FeatureExtractionStep

interface FeatureExtractionStep<T>
Deprecated: Use FeatureExtractorBuilder.FeatureExtractionStep from atrium-logic; will be removed with 1.0.0

Step to define the feature extraction as such where a one can include a check by returning None in case the extraction should not be carried out.

Parameters

T - the type of the current subject.

Properties

description

abstract val description: Translatable

The previously specified description which describes the kind of feature extraction.

originalAssertionContainer

abstract val originalAssertionContainer: Expect<T>

The previously specified assertion container from which we are going to extract the feature.

representationForFailure

abstract val representationForFailure: Any

The previously specified representation which will be used in case the feature cannot be extracted.

Functions

withFeatureExtraction

abstract fun <R> withFeatureExtraction(extraction: (subject: T) -> Option<R>): FeatureExtractorBuilder.OptionsStep<T, R>

Defines the feature extraction as such which is most likely based on the current subject (but does not need to be).

Companion Object Functions

create

fun <T> create(originalAssertionContainer: Expect<T>, description: Translatable, representationForFailure: Any): FeatureExtractorBuilder.FeatureExtractionStep<T>

Creates a FeatureExtractionStep in the context of the FeatureExtractorBuilder.