doc / ch.tutteli.atrium.creating

Package ch.tutteli.atrium.creating

Everything involved in creating Assertions.

Types

AssertionHolder

interface AssertionHolder

Represents a general interface which merely defines that assertions can be added to this type via the addAssertion method.

AssertionPlant

interface AssertionPlant<out T : Any> : BaseAssertionPlant<T, AssertionPlant<T>>

Represents a plant for Assertions based on a non nullable subject.

AssertionPlantNullable

interface AssertionPlantNullable<out T> : BaseAssertionPlant<T, AssertionPlantNullable<T>>

Represents an assertion plant for nullable types.

AssertionPlantWithCommonFields

interface AssertionPlantWithCommonFields<out T>

An assertion plant which has CommonFields.

BaseAssertionPlant

interface BaseAssertionPlant<out T, out A : BaseAssertionPlant<T, A>> : SubjectProvider<T>

Represents a plant for Assertions and offers methods to addAssertions to this plant.

BaseCollectingAssertionPlant

interface BaseCollectingAssertionPlant<out T, out A : BaseAssertionPlant<T, A>, out C : BaseCollectingAssertionPlant<T, A, C>> : BaseAssertionPlant<T, A>

Represents a BaseAssertionPlant which is intended to serve as receiver object for lambdas which create Assertions, in which this assertion plant collects the so created assertions.

BaseExpectConfig

interface BaseExpectConfig

BaseReportingAssertionPlant

interface BaseReportingAssertionPlant<out T, out A : BaseAssertionPlant<T, A>> : BaseAssertionPlant<T, A>, AssertionPlantWithCommonFields<T>

Represents a plant for Assertions and offers methods to addAssertions to this plant.

CheckingAssertionPlant

interface CheckingAssertionPlant<out T : Any> : AssertionPlant<T>

Represents a plant for Assertions and offers the possibility to check whether allAssertionsHold which have been added to this plant (since the last check).

CollectingAssertionContainer

interface CollectingAssertionContainer<T> : Expect<T>

Represents a container for Assertion which is intended to serve as receiver object for lambdas which create Assertions, in which this Expect collects the assertions created this ways.

CollectingAssertionPlant

interface CollectingAssertionPlant<out T : Any> : AssertionPlant<T>, BaseCollectingAssertionPlant<T, AssertionPlant<T>, CollectingAssertionPlant<T>>

Represents an AssertionPlant which is intended to serve as receiver object for lambdas which create Assertions, in which this assertion plant collects the so created assertions.

CollectingAssertionPlantNullable

interface CollectingAssertionPlantNullable<out T> : AssertionPlantNullable<T>, BaseCollectingAssertionPlant<T, AssertionPlantNullable<T>, CollectingAssertionPlantNullable<T>>

Represents an AssertionPlantNullable which is intended to serve as receiver object for lambdas which create Assertions, in which this assertion plant collects the so created assertions.

Expect

interface Expect<T> : SubjectProvider<T>

Represents the extension point of Assertion functions and sophisticated builders for subjects of type T.

FeatureExpect

interface FeatureExpect<T, R> : Expect<R>

Represents an Expect which results due to a change of the Expect.maybeSubject to a feature of the subject.

FeatureExpectConfig

interface FeatureExpectConfig : BaseExpectConfig

MaybeSubject

sealed class MaybeSubject<out T>

Represents a subject of an assertion which might be Present or Absent.

ReportingAssertionContainer

interface ReportingAssertionContainer<T> : RootExpect<T>

Represents a container for Assertions and offers the possibility to addAssertions which are reported in case they do not hold.

ReportingAssertionPlant

interface ReportingAssertionPlant<out T : Any> : AssertionPlant<T>, BaseReportingAssertionPlant<T, AssertionPlant<T>>

Represents a plant for Assertions and offers the possibility to addAssertions and to report them.

ReportingAssertionPlantNullable

interface ReportingAssertionPlantNullable<out T> : AssertionPlantNullable<T>, BaseReportingAssertionPlant<T, AssertionPlantNullable<T>>

Represents an assertion plant for nullable types and offers the possibility to addAssertions and to report them.

RootExpect

interface RootExpect<T> : Expect<T>

Represents the root of an Expect chain, intended as extension point for functionality which should only be available on the root.

RootExpectConfig

interface RootExpectConfig : BaseExpectConfig

SubjectProvider

interface SubjectProvider<out T> : AssertionHolder

Provides the subject of an Assertion.

Annotations

AssertMarker

annotation class AssertMarker

DSL Marker for AssertionPlant (and its type alias Assert).

ExpectMarker

annotation class ExpectMarker

DSL Marker for Expect.

ExperimentalExpectConfig

annotation class ExperimentalExpectConfig

Exceptions

PlantHasNoSubjectException

class PlantHasNoSubjectException : RuntimeException

Represents the Exception that an AssertionPlant.subject was not defined but one tried to access it.

Type Aliases

Assert

typealias Assert<T> = AssertionPlant<T>

Type alias for AssertionPlant which should be used in API modules.