doc / ch.tutteli.atrium.creating / BaseReportingAssertionPlant

BaseReportingAssertionPlant

interface BaseReportingAssertionPlant<out T, out A : BaseAssertionPlant<T, A>> : BaseAssertionPlant<T, A>, AssertionPlantWithCommonFields<T>
Deprecated: Switch from Assert to Expect; will be removed with 1.0.0

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

It defines what ReportingAssertionPlant and ReportingAssertionPlantNullable have in common.

Parameters

T - The type of the subject of this AssertionPlant.

A - A subtype of BaseAssertionPlant which is used in the fluent style API.

Inherited Properties

commonFields

abstract val commonFields: AssertionPlantWithCommonFields.CommonFields<T>

CommonFields of this plant.

maybeSubject

open val maybeSubject: Option<T>

Either Some wrapping the subject of an Assertion or None in case a previous subject change could not be carried out.

subjectProvider

abstract val subjectProvider: () -> T

The provider which provides subject.

Inherited Functions

addAssertion

abstract fun addAssertion(assertion: Assertion): A

Adds the given assertion to this plant.

Extension Functions

asExpect

fun <T, A : BaseAssertionPlant<T, *>> A.asExpect(): Expect<T>

Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable.

Inheritors

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.