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

FeatureExtractor

interface FeatureExtractor
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

Defines the contract for sophisticated safe feature extractions including assertion creation for the feature.

It is similar to FeatureAssertions but differs in the intended usage. FeatureAssertions are intended to make assertions about a return value of a method call or a property, regardless if this call/access fails or not. The FeatureExtractor on the other hand should be used if it is already known, that the call/access fails depending on given arguments. For instance, List.get is a good example where it fails if the given index is out of bounds.

Types

Creator

interface Creator<TSubject, T : Any> : FeatureExtractor.CreatorLike<TSubject, T, AssertionPlant<T>, CollectingAssertionPlant<T>>

Final step of the sophisticated safe feature extraction where one can define extractAndAssertIt for the extracted feature or use extract to get a feature AssertionPlant.

CreatorLike

interface CreatorLike<TSubject, T, A : BaseAssertionPlant<T, A>, C : BaseCollectingAssertionPlant<T, A, C>>

Final step of the sophisticated safe feature extraction where one can define extractAndAssertIt for the extracted feature or use extract to get the assertion plant.

CreatorNullable

interface CreatorNullable<TSubject, T> : FeatureExtractor.CreatorLike<TSubject, T, AssertionPlantNullable<T>, CollectingAssertionPlantNullable<T>>

Final step of the sophisticated safe feature extraction where one can define extractAndAssertIt for the extracted feature or use extract to get a feature AssertionPlantNullable.

DescriptionOption

interface DescriptionOption

Option step which allows to specify the description which will be used to describe the feature.

ParameterObject

data class ParameterObject<TSubject, T>

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

ParameterObjectOption

interface ParameterObjectOption

Option step to define the ParameterObject.

Companion Object Properties

builder

val builder: FeatureExtractor.DescriptionOption

Entry point to use the feature extractor.