doc / ch.tutteli.atrium.logic / AnyAssertions

AnyAssertions

interface AnyAssertions (source)

Collection of assertion functions and builders which are applicable to any type (sometimes Any? sometimes Any).

Functions

because

abstract fun <T> because(container: AssertionContainer<T>, reason: String, assertionCreator: Expect<T>.() -> Unit): Assertion

isA

abstract fun <T, TSub : Any> isA(container: AssertionContainer<T>, subType: KClass<TSub>): SubjectChangerBuilder.ExecutionStep<T, TSub>

isNotIn

abstract fun <T> isNotIn(container: AssertionContainer<T>, expected: Iterable<T>): Assertion

isNotSameAs

abstract fun <T> isNotSameAs(container: AssertionContainer<T>, expected: T): Assertion

isSameAs

abstract fun <T> isSameAs(container: AssertionContainer<T>, expected: T): Assertion

notToBe

abstract fun <T> notToBe(container: AssertionContainer<T>, expected: T): Assertion

notToBeNullButOfType

abstract fun <T : Any> notToBeNullButOfType(container: AssertionContainer<T?>, subType: KClass<T>): SubjectChangerBuilder.ExecutionStep<T?, T>

toBe

abstract fun <T> toBe(container: AssertionContainer<T>, expected: T): Assertion

toBeNullIfNullGivenElse

abstract fun <T : Any> toBeNullIfNullGivenElse(container: AssertionContainer<T?>, assertionCreatorOrNull: (Expect<T>.() -> Unit)?): Assertion

Inheritors

DefaultAnyAssertions

class DefaultAnyAssertions : AnyAssertions