doc / ch.tutteli.atrium

Package ch.tutteli.atrium

Types

AtriumFactory object AtriumFactory : IAtriumFactory

The abstract factory of atrium.

IAtriumFactory interface IAtriumFactory

The minimum contract of the abstract factory of atrium.

Properties

message val <T : Throwable> IAssertionPlant<T>.message: IAssertionPlant<String>

Creates an IAssertionPlantNullable for the message of the plant's subject (which is an Throwable) and makes the assertion that message isNotNull.

Functions

contains fun <T : CharSequence> IAssertionPlant<T>.contains(expected: CharSequence): IAssertionPlant<T>

Makes the assertion that IAssertionPlant.subject contains the expected.

fun <T : CharSequence> IAssertionPlant<T>.contains(expected: CharSequence, vararg otherExpected: CharSequence): IAssertionPlant<T>

Makes the assertion that IAssertionPlant.subject contains the expected and otherExpecteds (if defined).

fun <T : CharSequence> IAssertionPlant<T>.contains(expected: Any, vararg otherExpected: Any): IAssertionPlant<T>

Makes the assertion that IAssertionPlant.subject contains expected's toString representation and the toString representation of the otherExpected (if defined).

containsNot fun <T : CharSequence> IAssertionPlant<T>.containsNot(expected: CharSequence): IAssertionPlant<T>

Makes the assertion that IAssertionPlant.subject does not contain the expected.

fun <T : CharSequence> IAssertionPlant<T>.containsNot(expected: CharSequence, vararg otherExpected: CharSequence): IAssertionPlant<T>

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

fun <T : CharSequence> IAssertionPlant<T>.containsNot(expected: Any, vararg otherExpected: Any): IAssertionPlant<T>

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

endsNotWith fun <T : CharSequence> IAssertionPlant<T>.endsNotWith(expected: CharSequence): IAssertionPlant<T>

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

endsWith fun <T : CharSequence> IAssertionPlant<T>.endsWith(expected: CharSequence): IAssertionPlant<T>

Makes the assertion that IAssertionPlant.subject ends with expected.

genericCheck fun <T : Any> IAssertionPlant<T>.genericCheck(feature: KProperty0<Boolean>): IAssertionPlant<T>

Use this function to make the assertion about the existing property feature of the IAssertionPlant.subject that the property is true.

genericNotCheck fun <T : Any> IAssertionPlant<T>.genericNotCheck(feature: KProperty0<Boolean>): IAssertionPlant<T>

Use this function to make the assertion about the existing property feature of the IAssertionPlant.subject that the property is false.

hasSize fun <T : Collection<*>> IAssertionPlant<T>.hasSize(size: Int): IAssertionPlant<T>

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

isA fun <TSub : Any> IAssertionPlant<Any>.isA(): IAssertionPlant<TSub>

Makes the assertion that IAssertionPlant.subject is a TSub (the same type or a sub-type).

fun <TSub : Any> IAssertionPlant<Any>.isA(createAssertions: IAssertionPlant<TSub>.() -> Unit): IAssertionPlant<TSub>

Makes the assertion that IAssertionPlant.subject is a TSub (the same type or a sub-type) and if so, uses createAssertions which could create further assertions which are lazily evaluated at the end.

isEmpty fun <T : CharSequence> IAssertionPlant<T>.isEmpty(): IAssertionPlant<T>

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

fun <T : Collection<*>> IAssertionPlant<T>.isEmpty(): IAssertionPlant<T>

Makes the assertion that IAssertionPlant.subject is an empty Collection.

isGreaterOrEquals fun IAssertionPlant<Int>.isGreaterOrEquals(expected: Int): IAssertionPlant<Int>

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

isGreaterThan fun IAssertionPlant<Int>.isGreaterThan(expected: Int): IAssertionPlant<Int>

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

isNotEmpty fun <T : CharSequence> IAssertionPlant<T>.isNotEmpty(): IAssertionPlant<T>

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

isNotNull fun <T : Any> IAssertionPlantNullable<T?>.isNotNull(): IAssertionPlant<T>

Makes the assertion that IAssertionPlant.subject is not null.

fun <T : Any> IAssertionPlantNullable<T?>.isNotNull(createAssertions: IAssertionPlant<T>.() -> Unit): IAssertionPlant<T>

Makes the assertion that IAssertionPlant.subject is not null and if so, uses createAssertions which could create further assertions which are lazily evaluated at the end.

isNotSame fun <T : Any> IAssertionPlant<T>.isNotSame(expected: T): IAssertionPlant<T>

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

isSame fun <T : Any> IAssertionPlant<T>.isSame(expected: T): IAssertionPlant<T>

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

isSmallerOrEquals fun IAssertionPlant<Int>.isSmallerOrEquals(expected: Int): IAssertionPlant<Int>

Makes the assertion that IAssertionPlant.subject is smaller than or equals expected.

isSmallerThan fun IAssertionPlant<Int>.isSmallerThan(expected: Int): IAssertionPlant<Int>

Makes the assertion that IAssertionPlant.subject is smaller than expected.

its fun <T : Any, TFeature : Any> IAssertionPlant<T>.its(feature: KProperty0<TFeature>): IAssertionPlant<TFeature>

Creates an IAssertionPlant which immediately evaluates IAssertions using the given feature as subject.

fun <T : Any, TFeature : Any> IAssertionPlant<T>.its(feature: KProperty0<TFeature>, createAssertions: IAssertionPlant<TFeature>.() -> Unit): IAssertionPlant<TFeature>

Creates an IAssertionPlant which lazily evaluates IAssertions using the given feature as subject.

fun <T : Any, TFeature> IAssertionPlant<T>.its(feature: KProperty0<TFeature>): IAssertionPlantNullable<TFeature>

Creates an IAssertionPlantNullable using the given feature as subject.

message fun <T : Throwable> IAssertionPlant<T>.message(createAssertions: IAssertionPlant<String>.() -> Unit): IAssertionPlant<String>

Creates an IAssertionPlantNullable for the message of the plant's subject (which is an Throwable) and makes the assertion that message isNotNull and uses createAssertions which might create further IAssertions which are lazily evaluated at the end.

notToBe fun <T : Any> IAssertionPlant<T>.notToBe(expected: T): IAssertionPlant<T>

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

startsNotWith fun <T : CharSequence> IAssertionPlant<T>.startsNotWith(expected: CharSequence): IAssertionPlant<T>

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

startsWith fun <T : CharSequence> IAssertionPlant<T>.startsWith(expected: CharSequence): IAssertionPlant<T>

Makes the assertion that IAssertionPlant.subject starts with expected.

toBe fun <T : Any> IAssertionPlant<T>.toBe(expected: T): IAssertionPlant<T>

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