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

RepresentationInCaseOfFailureStep

interface RepresentationInCaseOfFailureStep<T> (source)

Step which allows to to define the representation which shall be used in case the extraction cannot be performed.

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.

Functions

withRepresentationForFailure

open fun withRepresentationForFailure(translatable: Translatable): FeatureExtractorBuilder.FeatureExtractionStep<T>

Uses translatable as representation which will be used in case the extraction cannot be performed.

open fun withRepresentationForFailure(representationProvider: () -> Any?): FeatureExtractorBuilder.FeatureExtractionStep<T>

Uses the given representationProvider, by turning it into a LazyRepresentation, to get the representation which will be used in case the extraction cannot be performed.

abstract fun withRepresentationForFailure(representation: Any): FeatureExtractorBuilder.FeatureExtractionStep<T>

Uses the given representation in case the extraction cannot be performed.

Companion Object Functions

create

fun <T> create(originalAssertionContainer: Expect<T>, description: Translatable): FeatureExtractorBuilder.RepresentationInCaseOfFailureStep<T>

Creates a RepresentationInCaseOfFailureStep in the context of the FeatureExtractorBuilder.