doc / ch.tutteli.atrium.creating

Package ch.tutteli.atrium.creating

Everything involved in creating Assertions.

Types

AssertionContainer

interface AssertionContainer<T>

Represents the extension point of the logic level for subjects of type T.

CollectingExpect

interface CollectingExpect<T> : Expect<T>

Represents a container for Assertion which is intended to serve as receiver object for lambdas which create Assertions, in which this Expect collects the assertions created this way.

ComponentFactory

data class ComponentFactory

Provides a build lambda which produces the component and specifies via producesSingleton whether this component should be treated as singleton or not.

ComponentFactoryContainer

interface ComponentFactoryContainer

Manages the factories to create the different components of Atrium. It takes basically the responsibility of a dependency injection facility, tailored for Atrium.

DelegatingExpect

interface DelegatingExpect<T> : Expect<T>

Represents an Expect which passes on appended Assertions to a given Expect.

ErrorMessages

enum class ErrorMessages : StringBasedTranslatable

Contains translations which are used in error like messages.

Expect

interface Expect<T>

Represents the extension point for Assertion functions and sophisticated builders for subjects of type T.

ExpectInternal

interface ExpectInternal<T> : Expect<T>, AssertionContainer<T>

Sole purpose of this interface is to hide AssertionContainer from newcomers which usually don't have to deal with this.

FeatureExpect

interface FeatureExpect<T, R> : Expect<R>

Represents an Expect which results due to a feature extraction from he subject of the expectation.

FeatureExpectOptions

data class FeatureExpectOptions<R>

Additional (non-mandatory) options to create a FeatureExpect.

RootExpect

interface RootExpect<T> : Expect<T>

Represents the root of an Expect chain, intended as extension point for functionality which should only be available on the root.

RootExpectOptions

data class RootExpectOptions<T>

Additional (non-mandatory) options to create a RootExpect.

Annotations

ExperimentalComponentFactoryContainer

annotation class ExperimentalComponentFactoryContainer

Exceptions

PleaseUseReplacementException

class PleaseUseReplacementException : Exception

Indicates a problem which was indicated by a @Deprecated annotation but was ignored by you ;-)

Functions

build

fun <I : Any> ComponentFactoryContainer.build(): I

Returns the component of type I using a corresponding factory or throws an IllegalStateException in case no factory was found which is able to build a component of the given type.

buildChained

fun <I : Any> ComponentFactoryContainer.buildChained(): Sequence<I>

Returns a chain of components of type I using a corresponding factory or throws an IllegalStateException in case no factory was found which is able to build a chain of components of the given type.