Package-level declarations

Everything involved in creating Assertions.

Types

Link copied to clipboard

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

Link copied to clipboard
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.

Link copied to clipboard
data class ComponentFactory(val build: (ComponentFactoryContainer) -> Any, val producesSingleton: Boolean)

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

Link copied to clipboard

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

Link copied to clipboard
interface DelegatingExpect<T> : Expect<T>

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

Link copied to clipboard

Contains translations which are used in error like messages.

Link copied to clipboard
interface Expect<T>

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

Link copied to clipboard
typealias ExpectationCreator<T> = Expect<T>.() -> Unit
Link copied to clipboard
interface ExpectGrouping

Represents a group of expectations including nested groups of expectations (nested ExpectGrouping).

Link copied to clipboard

The internal type which we work with which combines Expect, AssertionContainer and ExpectGrouping.

Link copied to clipboard
interface FeatureExpect<T, R> : Expect<R>

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

Link copied to clipboard
data class FeatureExpectOptions<R>(val description: Translatable? = null, val representationInsteadOfFeature: (R) -> Any? = null)

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

Link copied to clipboard

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

Link copied to clipboard
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.

Link copied to clipboard
data class RootExpectOptions<T>(val expectationVerb: Translatable?, val representationInsteadOfSubject: (T) -> Any?, val componentFactoryContainer: ComponentFactoryContainer?)

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

Functions

Link copied to clipboard

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.

Link copied to clipboard

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.