atrium-api-cc-de_CH / ch.tutteli.atrium.api.cc.de_CH / ch.tutteli.atrium.creating.AssertionPlant

Extensions for ch.tutteli.atrium.creating.AssertionPlant

beginntMit

fun <T : CharSequence> Assert<T>.beginntMit(expected: CharSequence): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject starts with expected.

beginntNichtMit

fun <T : CharSequence> Assert<T>.beginntNichtMit(expected: CharSequence): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject does not start with expected.

endetMit

fun <T : CharSequence> Assert<T>.endetMit(expected: CharSequence): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject ends with expected.

endetNichtMit

fun <T : CharSequence> Assert<T>.endetNichtMit(expected: CharSequence): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject does not end with expected.

enthaelt

val <T : CharSequence> Assert<T>.enthaelt: CharSequenceContainsBuilder<T, CharSequenceContainsNoOpSearchBehaviour>

Creates a CharSequenceContainsBuilder based on this AssertionPlant which allows to define more sophisticated contains assertions.

fun <T : CharSequence> Assert<T>.enthaelt(expected: Any, vararg otherExpected: Any): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject contains expected's toString representation and the toString representation of the otherExpected (if defined), using a non disjoint search.

fun <E, T : Iterable<E>> Assert<T>.enthaelt(expected: E, vararg otherExpected: E): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject contains expected and the otherExpected (if defined).

fun <E : Any, T : Iterable<E>> Assert<T>.enthaelt(assertionCreator: AssertionPlant<E>.() -> Unit, vararg otherAssertionCreators: AssertionPlant<E>.() -> Unit): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject contains an entry holding the assertions created by the assertionCreator and an additional entry for each otherAssertionCreators (if defined) where it does not matter in which order the entries appear.

enthaeltNicht

fun <T : CharSequence> Assert<T>.enthaeltNicht(expected: Any, vararg otherExpected: Any): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject does not contain expected's toString representation and neither one of the otherExpected's toString representation (if defined).

fun <E, T : Iterable<E>> Assert<T>.enthaeltNicht(expected: E, vararg otherExpected: E): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject does not contain expected and neither one of the otherExpected (if defined).

enthaeltNichtDieStandardUebersetzungVon

fun <T : CharSequence> Assert<T>.enthaeltNichtDieStandardUebersetzungVon(expected: Translatable, vararg otherExpected: Translatable): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject does not contain expected's getDefault representation and neither one of the otherExpected's getDefault representation (if defined).

enthaeltStandardUebersetzungVon

fun <T : CharSequence> Assert<T>.enthaeltStandardUebersetzungVon(expected: Translatable, vararg otherExpected: Translatable): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject contains expected's getDefault representation and the getDefault representations of the otherExpected (if defined), using a non disjoint search.

enthaeltStrikt

fun <E, T : Iterable<E>> Assert<T>.enthaeltStrikt(expected: E, vararg otherExpected: E): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject contains only expected and the otherExpected (if defined) in the defined order.

fun <E : Any, T : Iterable<E>> Assert<T>.enthaeltStrikt(assertionCreator: AssertionPlant<E>.() -> Unit, vararg otherAssertionCreators: AssertionPlant<E>.() -> Unit): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject contains only an entry holding the assertions created by the assertionCreator and an additional entry for each otherAssertionCreators (if defined) in the defined order holding the assertions created by them.

hatDieGroesse

fun <T : Collection<*>> Assert<T>.hatDieGroesse(size: Int): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject's Collection.size is size.

ist

fun <T : Any> Assert<T>.ist(expected: T): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject is (equals) expected.

istEin

fun <TSub : Any> Assert<Any>.istEin(assertionCreator: AssertionPlant<TSub>.() -> Unit): Unit

Makes the assertion that AssertionPlant.subject is a TSub (the same type or a sub-type) and if so, uses assertionCreator which could create further assertions which are added as a group.

istFalse

fun Assert<Boolean>.istFalse(): AssertionPlant<Boolean>

Makes the assertion that AssertionPlant.subject is false.

istGroesserAls

fun <T> Assert<T>.istGroesserAls(expected: T): AssertionPlant<T> where T : Number, T : Comparable<T>

Makes the assertion that AssertionPlant.subject is greater than expected.

istGroesserOderGleich

fun <T> Assert<T>.istGroesserOderGleich(expected: T): AssertionPlant<T> where T : Number, T : Comparable<T>

Makes the assertion that AssertionPlant.subject is greater than or equals expected.

istKleinerAls

fun <T> Assert<T>.istKleinerAls(expected: T): AssertionPlant<T> where T : Number, T : Comparable<T>

Makes the assertion that AssertionPlant.subject is less than expected.

istKleinerOderGleich

fun <T> Assert<T>.istKleinerOderGleich(expected: T): AssertionPlant<T> where T : Number, T : Comparable<T>

Makes the assertion that AssertionPlant.subject is less than or equals expected.

istLeer

fun <T : CharSequence> Assert<T>.istLeer(): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject.kotlin.text.isEmpty.

istNicht

fun <T : Any> Assert<T>.istNicht(expected: T): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject is not (does not equal) expected.

istNichtLeer

fun <T : CharSequence> Assert<T>.istNichtLeer(): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject.kotlin.text.isNotEmpty.

istNichtSelbeInstanzWie

fun <T : Any> Assert<T>.istNichtSelbeInstanzWie(expected: T): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject is not the same instance as expected.

istSelbeInstanzWie

fun <T : Any> Assert<T>.istSelbeInstanzWie(expected: T): AssertionPlant<T>

Makes the assertion that AssertionPlant.subject is the same instance as expected.

istTrue

fun Assert<Boolean>.istTrue(): AssertionPlant<Boolean>

Makes the assertion that AssertionPlant.subject is true.

message

fun <T : Throwable> Assert<T>.message(assertionCreator: AssertionPlant<String>.() -> Unit): Unit

Creates an AssertionPlantNullable for the message of the plant's subject (which is a Throwable) and makes the assertion that message istNichtNull and uses assertionCreator which might create further Assertions which are lazily evaluated at the end.

property

fun <T : Any, TProperty : Any> Assert<T>.property(property: KProperty0<TProperty>): AssertionPlant<TProperty>

Creates an AssertionPlant for the given property which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the given property, to the current plant.

fun <T : Any, TProperty : Any> Assert<T>.property(property: KProperty0<TProperty>, assertionCreator: AssertionPlant<TProperty>.() -> Unit): AssertionPlant<TProperty>

Creates an AssertionPlant for the given property which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the given property, to the current plant -- starting with a group consisting of the Assertions created by the assertionCreator lambda.

rueckgabewertVon

fun <T : Any, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction0<TReturnValue>): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant.

fun <T : Any, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction0<TReturnValue>, assertionCreator: AssertionPlant<TReturnValue>.() -> Unit): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant -- starting with a group consisting of the Assertions created by the assertionCreator lambda.

fun <T : Any, T1, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction1<T1, TReturnValue>, arg1: T1): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method with arg1, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant.

fun <T : Any, T1, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction1<T1, TReturnValue>, arg1: T1, assertionCreator: AssertionPlant<TReturnValue>.() -> Unit): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method with arg1, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant -- starting with a group consisting of the Assertions created by the assertionCreator lambda.

fun <T : Any, T1, T2, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction2<T1, T2, TReturnValue>, arg1: T1, arg2: T2): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method with arg1 and arg2, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant.

fun <T : Any, T1, T2, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction2<T1, T2, TReturnValue>, arg1: T1, arg2: T2, assertionCreator: AssertionPlant<TReturnValue>.() -> Unit): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method with arg1 and arg2, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant -- starting with a group consisting of the Assertions created by the assertionCreator lambda.

fun <T : Any, T1, T2, T3, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction3<T1, T2, T3, TReturnValue>, arg1: T1, arg2: T2, arg3: T3): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method with arg1, arg2 and arg3, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant.

fun <T : Any, T1, T2, T3, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction3<T1, T2, T3, TReturnValue>, arg1: T1, arg2: T2, arg3: T3, assertionCreator: AssertionPlant<TReturnValue>.() -> Unit): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method with arg1, arg2 and arg3, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant -- starting with a group consisting of the Assertions created by the assertionCreator lambda.

fun <T : Any, T1, T2, T3, T4, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction4<T1, T2, T3, T4, TReturnValue>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method with arg1, arg2, arg3 and arg4, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant.

fun <T : Any, T1, T2, T3, T4, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction4<T1, T2, T3, T4, TReturnValue>, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: AssertionPlant<TReturnValue>.() -> Unit): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method with arg1, arg2, arg3 and arg4, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant -- starting with a group consisting of the Assertions created by the assertionCreator lambda.

fun <T : Any, T1, T2, T3, T4, T5, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction5<T1, T2, T3, T4, T5, TReturnValue>, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method with arg1, arg2, arg3, arg4 and arg5, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant.

fun <T : Any, T1, T2, T3, T4, T5, TReturnValue : Any> Assert<T>.rueckgabewertVon(method: KFunction5<T1, T2, T3, T4, T5, TReturnValue>, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: AssertionPlant<TReturnValue>.() -> Unit): AssertionPlant<TReturnValue>

Creates an AssertionPlant, for the value returned by calling method with arg1, arg2, arg3, arg4 and arg5, which eventually adds AssertionGroups with a FeatureAssertionGroupType, containing the assertions created for the return value, to the current plant -- starting with a group consisting of the Assertions created by the assertionCreator lambda.

und

val <T : Any> AssertionPlant<T>.und: AssertionPlant<T>

Can be used to separate assertions when using the fluent API.

infix fun <T : Any> AssertionPlant<T>.und(assertionCreator: AssertionPlant<T>.() -> Unit): AssertionPlant<T>

Can be used to create a group of sub assertions when using the fluent API.