Companion
Provides helper methods for SubjectBasedOption contract.
Functions
Link copied to clipboard
operator fun <T, R, PO : SubjectBasedOption.DefinedOption<T, R, *>> invoke(expect: Expect<T>, subStep: PO.() -> Pair<() -> R, (T) -> R>, definedOptionFactory: () -> PO): R
Setups the SubjectBasedOption contract where the given expect, it's AssertionContainer.maybeSubject respectively, is used to determine if the resulting ifAbsent
or ifDefined
option is called where the definedOptionFactory initialises the builder (pattern) and the subStep then allows to define the ifDefined
and ifAbsent
steps.