doc / ch.tutteli.atrium.domain.creating.feature.extract / FeatureExtractor / ParameterObject

ParameterObject

data class ParameterObject<TSubject, T> (source)
Deprecated: Switch from `Assert` to `Expect` and use then FeatureExtractor from package ch.tutteli.atrium.domain.creating.changers instead; will be removed with 1.0.0

A parameter object which contains all necessary information to extract a feature -- however, not to create assertions.

Parameters

subjectPlant - The AssertionPlant which contains the subject from which the subject is extracted.

extractionNotSuccessful - Used as AssertionGroup.representation in case canBeExtracted evaluates to false.

warningCannotEvaluate - The Translatable used to explain why the extraction could not be carried out.

canBeExtracted - Indicates whether it is safe to extract the feature or not (e.g. Map.containsKey as counter part to Map.get)

featureExtraction - The feature extraction as such (e.g. Map.get, List.get etc.)

Constructors

<init>

ParameterObject(subjectPlant: BaseAssertionPlant<TSubject, *>, extractionNotSuccessful: Translatable, warningCannotEvaluate: Translatable, canBeExtracted: (TSubject) -> Boolean, featureExtraction: (TSubject) -> T)

A parameter object which contains all necessary information to extract a feature -- however, not to create assertions.

Properties

canBeExtracted

val canBeExtracted: (TSubject) -> Boolean

Indicates whether it is safe to extract the feature or not (e.g. Map.containsKey as counter part to Map.get)

extractionNotSuccessful

val extractionNotSuccessful: Translatable

Used as AssertionGroup.representation in case canBeExtracted evaluates to false.

featureExtraction

val featureExtraction: (TSubject) -> T

The feature extraction as such (e.g. Map.get, List.get etc.)

subjectPlant

val subjectPlant: BaseAssertionPlant<TSubject, *>

The AssertionPlant which contains the subject from which the subject is extracted.

warningCannotEvaluate

val warningCannotEvaluate: Translatable

The Translatable used to explain why the extraction could not be carried out.