atrium-domain-builders-jvm / ch.tutteli.atrium.domain.builders.creating / MetaFeatureBuilder

MetaFeatureBuilder

object MetaFeatureBuilder (source)

Builder which helps to create MetaFeature inter alia by using the MethodCallFormatter defined initially by the Reporter

Functions

create

fun <T, R> create(expect: <ERROR CLASS><T>, description: String, provider: (T) -> R): <ERROR CLASS><R>
fun <T, R> create(expect: <ERROR CLASS><T>, description: <ERROR CLASS>, provider: (T) -> R): <ERROR CLASS><R>

createSubjectBased

fun <T, R> createSubjectBased(expect: <ERROR CLASS><T>, provider: (T) -> <ERROR CLASS><R>): <ERROR CLASS><R>

creates a MetaFeature which is entirely based on the subject (i.e. also the description).

f0

fun <R> f0(expect: <ERROR CLASS><out <ERROR CLASS>>, f: KFunction0<R>): <ERROR CLASS>

f1

fun <A1, R> f1(expect: <ERROR CLASS><out <ERROR CLASS>>, f: KFunction1<A1, R>, a1: A1): <ERROR CLASS>

f2

fun <A1, A2, R> f2(expect: <ERROR CLASS><out <ERROR CLASS>>, f: KFunction2<A1, A2, R>, a1: A1, a2: A2): <ERROR CLASS>

f3

fun <A1, A2, A3, R> f3(expect: <ERROR CLASS><out <ERROR CLASS>>, f: KFunction3<A1, A2, A3, R>, a1: A1, a2: A2, a3: A3): <ERROR CLASS>

f4

fun <A1, A2, A3, A4, R> f4(expect: <ERROR CLASS><out <ERROR CLASS>>, f: KFunction4<A1, A2, A3, A4, R>, a1: A1, a2: A2, a3: A3, a4: A4): <ERROR CLASS>

f5

fun <A1, A2, A3, A4, A5, R> f5(expect: <ERROR CLASS><out <ERROR CLASS>>, f: KFunction5<A1, A2, A3, A4, A5, R>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): <ERROR CLASS>

property

fun <TProperty> property(property: KProperty0<TProperty>): <ERROR CLASS>

Extension Functions

asExpect

fun <T, A> A.asExpect(): <ERROR CLASS><T>
fun <T : Any, A> A.asExpect(assertionCreator: <ERROR CLASS><T>.() -> Unit): A

Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable.