class ExtractedFeaturePostStep<T, R> : PostFinalStep<T, R, FeatureExpect<T, R>>
(source)
Option step which allows to decide what should be done with the extracted feature of type R.
Notice, this class does not add any functionality to PostFinalStep and is more like a marker. The purpose of the marker is extensibility, this way you can write a post-final-step which only applies to ExtractedFeaturePostStep and not to all kind of PostFinalStep.
expect
- The Expect which was involved in the building process
and holds assertion for the initial subject.
extract
- The extraction of the feature which creates and returns a new Expect of type R.
extractAndApply
- The extraction of the feature which not only creates and
returns a new Expect of type R but also applies a given assertionCreator lambda.
ExtractedFeaturePostStep(expect: Expect<T>, extract: Expect<T>.() -> FeatureExpect<T, R>, extractAndApply: Expect<T>.(Expect<R>.() -> Unit) -> Expect<R>)
Option step which allows to decide what should be done with the extracted feature of type R. |
val action: Expect<T>.() -> E
An action such as transform, extract etc. which creates and returns a new Expect of type R. |
|
val actionAndApply: Expect<T>.(Expect<R>.() -> Unit) -> Expect<R>
An action such as transform, extract etc. which not only creates and returns a new Expect of type R but also applies a given assertionCreator lambda. |
|
val expect: Expect<T>
Expect which was involved in the building process and holds assertion for the initial subject. |
fun addToFeature(assertionCreator: Expect<R>.() -> Unit): Expect<R>
Creates a new Expect for the feature, adds all assertions the given assertionCreator creates for it and returns the new Expect. |
|
fun addToInitial(assertionCreator: Expect<R>.() -> Unit): Expect<T>
Creates a new Expect for the feature, adds all assertions the given assertionCreator creates for it and returns the initial Expect. |
|
fun collect(assertionCreator: Expect<R>.() -> Unit): Assertion
Collects the assertions the given assertionCreator might create for the new Expect of the feature and returns them as a single Assertion |
|
fun getExpectOfFeature(): E
Returns the newly created Expect for the feature. |