doc / ch.tutteli.atrium.creating / BaseAssertionPlant

BaseAssertionPlant

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

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

It defines what AssertionPlant and AssertionPlantNullable have in common. However it is typically not used as entry point for assertion functions. Most of the time you want to define an assertion function for AssertionPlant, Assert respectively (Assert is a typealias of AssertionPlant).

Parameters

T - The type of the subject of this BaseAssertionPlant. A - A subtype of BaseAssertionPlant which is used in the fluent style API.

Properties

subject

abstract val subject: T

The subject for which this plant will create Assertions.

Functions

addAssertion

abstract fun addAssertion(assertion: Assertion): A

Adds the given assertion to this plant.

Inheritors

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.

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.