doc / ch.tutteli.atrium.logic

Package ch.tutteli.atrium.logic

Contains all the assertion interfaces (e.g. AnyAssertions as well as _logic and helper functions for AssertionContainer

Types

AnyAssertions

interface AnyAssertions

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

BigDecimalAssertions

interface BigDecimalAssertions

Collection of assertion functions and builders which are applicable to subjects with a BigDecimal type.

CharSequenceAssertions

interface CharSequenceAssertions

Collection of assertion functions and builders which are applicable to subjects with a CharSequence type.

ChronoLocalDateAssertions

interface ChronoLocalDateAssertions

Collection of assertion functions and builders which are applicable to subjects with a ChronoLocalDate type.

ChronoLocalDateTimeAssertions

interface ChronoLocalDateTimeAssertions

Collection of assertion functions and builders which are applicable to subjects with a ChronoLocalDateTime type.

ChronoZonedDateTimeAssertions

interface ChronoZonedDateTimeAssertions

Collection of assertion functions and builders which are applicable to subjects with a ChronoZonedDateTime type.

CollectionAssertions

interface CollectionAssertions

Collection of assertion functions and builders which are applicable to subjects with a Collection type.

ComparableAssertions

interface ComparableAssertions

Collection of assertion functions and builders which are applicable to subjects with a Comparable type.

FeatureAssertions

interface FeatureAssertions

Collection of functions which help to create feature assertions by returning ExtractedFeaturePostStep.

FloatingPointAssertions

interface FloatingPointAssertions

Collection of assertion functions and builders which are applicable to subjects with a floating point number like type (currently Float and Double).

FloatingPointJvmAssertions

interface FloatingPointJvmAssertions

Collection of assertion functions and builders which are applicable to floating point number like types which are specific to the JVM platform (currently only for BigDecimal).

Fun0Assertions

interface Fun0Assertions

Collection of assertion functions and builders which are applicable to subjects with a kotlin.Function0 type.

IterableLikeAssertions

interface IterableLikeAssertions

Collection of assertion functions and builders which are applicable to subjects which can be transformed to an Iterable - intended for types which are Iterable like such as Array or Sequence.

IteratorAssertions

interface IteratorAssertions

Collection of assertion functions and builders which are applicable to subjects with an Iterator type.

ListAssertions

interface ListAssertions

Collection of assertion functions and builders which are applicable to subjects with a List type.

LocalDateAssertions

interface LocalDateAssertions

Collection of assertion functions and builders which are applicable to subjects with a LocalDate type.

LocalDateTimeAssertions

interface LocalDateTimeAssertions

Collection of assertion functions and builders which are applicable to subjects with a LocalDateTime type.

MapAssertions

interface MapAssertions

Collection of assertion functions and builders which are applicable to subjects with a Map type.

MapEntryAssertions

interface MapEntryAssertions

Collection of assertion functions and builders which are applicable to subjects with a Map.Entry type.

OptionalAssertions

interface OptionalAssertions

Collection of assertion functions and builders which are applicable to subjects with an Optional type.

PairAssertions

interface PairAssertions

Collection of assertion functions and builders which are applicable to subjects with a Pair type.

PathAssertions

interface PathAssertions

Collection of assertion functions and builders which are applicable to subjects with a Path type.

ThrowableAssertions

interface ThrowableAssertions

Collection of assertion functions and builders which are applicable to subjects with a Throwable type.

ZonedDateTimeAssertions

interface ZonedDateTimeAssertions

Collection of assertion functions and builders which are applicable to subjects with a ZonedDateTime type.

Properties

_logic

val <T> Expect<T>._logic: AssertionContainer<T>

Entry point to the logic of Atrium which is a level deeper than the API and does not return new Expect but Assertions and the like.

changeSubject

val <T> AssertionContainer<T>.changeSubject: SubjectChangerBuilder.KindStep<T>

Entry point to use the SubjectChangerBuilder based on this AssertionContainer.

extractFeature

val <T> AssertionContainer<T>.extractFeature: FeatureExtractorBuilder.DescriptionStep<T>

Entry point to use the FeatureExtractorBuilder based on this AssertionContainer.

Functions

_logicAppend

fun <T> Expect<T>._logicAppend(factory: AssertionContainer<T>.() -> Assertion): Expect<T>

Appends the Assertion the given factory creates based on this Expect.

collect

fun <T> AssertionContainer<T>.collect(assertionCreator: Expect<T>.() -> Unit): Assertion

Use this function if you want to make Assertions about a feature or you perform a type transformation or any other action which results in an assertion container being created and you do not require this resulting container.

collectForComposition

fun <T> collectForComposition(maybeSubject: Option<T>, assertionCreator: Expect<T>.() -> Unit): List<Assertion>

Use this function if you want to collect Assertions and use it as part of an AssertionGroup.

createDescriptiveAssertion

fun <T> AssertionContainer<T>.createDescriptiveAssertion(description: Translatable, representation: Any?, test: (T) -> Boolean): Assertion

Creates a DescriptiveAssertion based on the given description, representation and test.

toAssertionContainer

fun <T> Expect<T>.toAssertionContainer(): AssertionContainer<T>

Casts this Expect to an AssertionContainer so that you have access to the functionality provided on the logic level.

toExpect

fun <T> AssertionContainer<T>.toExpect(): Expect<T>

Casts this AssertionContainer back to an Expect so that you can use it in places where an Expect is used.