doc / ch.tutteli.atrium.domain.creating.iterable.contains / IterableContains

IterableContains

interface IterableContains (source)

Defines the contract for sophisticated Iterable builders.

The building process is typically started by the creation of a Builder, goes on by specifying a desired SearchBehaviour, defines which Checkers should be applied and is finalized by one of the IterableContainsAssertions which usually use a Creator.

Types

Builder

interface Builder<out E, out T : Iterable<E>, out S : IterableContains.SearchBehaviour> : Contains.Builder<T, S>

The entry point of the contract, containing the subjectProvider -- i.e. the subject of the assertion for which the sophisticated contain assertion should be created -- as well as the chosen searchBehaviour.

Checker

interface Checker : Contains.Checker

Represents a check for the search result such as: the object is contained exactly once in the input of the search.

CheckerOption

interface CheckerOption<out E, out T : Iterable<E>, out S : IterableContains.SearchBehaviour> : Contains.CheckerOption<T, S, IterableContains.Checker, IterableContains.Builder<E, T, S>>

The step of choosing/defining Checkers.

Creator

interface Creator<in T : Iterable<*>, in SC> : Contains.Creator<T, SC>

Represents the final step of a sophisticated contains assertion builder which creates the AssertionGroup as such.

SearchBehaviour

interface SearchBehaviour : Contains.SearchBehaviour

Represents a search behaviour but leaves it up to the Creator how this behaviour is implemented -- yet, it provides a method to decorate a description (a Translatable) in order that it reflects the search behaviour.