doc / ch.tutteli.atrium.creating

Package ch.tutteli.atrium.creating

Everything involved in creating IAssertion.

Types

IAssertionPlant

interface IAssertionPlant<out T : Any> : IAssertionPlantWithCommonFields<T>

Represents a plant for IAssertions and offers the possibility to check all the added assertions.

IAssertionPlantNullable

interface IAssertionPlantNullable<out T> : IAssertionPlantWithCommonFields<T>

Represents an assertion plant for nullable types.

IAssertionPlantWithCommonFields

interface IAssertionPlantWithCommonFields<out T>

An assertion plant which has CommonFields; provides the property subject for ease of use.

IDownCastBuilder

interface IDownCastBuilder<T : Any, TSub : T>

A builder for creating a down-casting IAssertion.

IThrowableFluent

interface IThrowableFluent

This interface is mainly here to simplify the KDoc generation (no need to define it twice, once in atrium-api-late-binding and once in atrium-impl-robstoll). Once Kotlin supports inline functions in interfaces, we will consolidate it to a proper API and get rid of ThrowableFluent in atrium-api-late-binding.

ThrowableFluent

class ThrowableFluent : IThrowableFluent

Provides toThrow methods for making assertions about a Throwable which one expects was thrown.

Functions

createAssertionsAndCheckThem

fun <T : Any> IAssertionPlant<T>.createAssertionsAndCheckThem(createAssertions: IAssertionPlant<T>.() -> Unit): IAssertionPlant<T>

Uses this plant as receiver of the given createAssertions function and then calls IAssertionPlant.checkAssertions.