doc / ch.tutteli.atrium.domain.creating / AnyAssertions

AnyAssertions

interface AnyAssertions
Deprecated: Use AnyAssertions from atrium-logic; will be removed with 1.0.0

Defines the minimum set of assertion functions and builders applicable to Any type, which an implementation of the domain of Atrium has to provide.

Functions

isA

abstract fun <T, TSub : Any> isA(expect: Expect<T>, subType: KClass<TSub>): ChangedSubjectPostStep<T, TSub>

isNotNull

abstract fun <T : Any> isNotNull(plant: AssertionPlantNullable<T?>, type: KClass<T>, assertionCreator: AssertionPlant<T>.() -> Unit): Assertion

isNotNullBut

abstract fun <T : Any> isNotNullBut(plant: AssertionPlantNullable<T?>, type: KClass<T>, expected: T): Assertion

isNotSame

abstract fun <T> isNotSame(subjectProvider: SubjectProvider<T>, expected: T): Assertion

isNullable

abstract fun <T : Any> isNullable(plant: AssertionPlantNullable<T?>, type: KClass<T>, expectedOrNull: T?): Assertion

isNullIfNullGivenElse

abstract fun <T : Any> isNullIfNullGivenElse(plant: AssertionPlantNullable<T?>, type: KClass<T>, assertionCreatorOrNull: (AssertionPlant<T>.() -> Unit)?): Assertion

isSame

abstract fun <T> isSame(subjectProvider: SubjectProvider<T>, expected: T): Assertion

notToBe

abstract fun <T> notToBe(subjectProvider: SubjectProvider<T>, expected: T): Assertion

notToBeNull

open fun <T : Any> notToBeNull(expect: Expect<T?>, subType: KClass<T>): ChangedSubjectPostStep<T?, T>

Convenience method for nullable-types which delegates to isA.

toBe

abstract fun <T> toBe(subjectProvider: SubjectProvider<T>, expected: T): Assertion

toBeNull

abstract fun <T> toBeNull(subjectProvider: SubjectProvider<T>): Assertion

toBeNullIfNullGivenElse

abstract fun <T : Any> toBeNullIfNullGivenElse(expect: Expect<T?>, type: KClass<T>, assertionCreatorOrNull: (Expect<T>.() -> Unit)?): Assertion

Inheritors

AnyAssertionsBuilder

object AnyAssertionsBuilder : AnyAssertions

Delegates inter alia to the implementation of AnyAssertions. In detail, it implements AnyAssertions by delegating to anyAssertions which in turn delegates to the implementation via loadSingleService.