doc / ch.tutteli.atrium.assertions.iterable.contains.creators / IterableContainsInOrderOnlyAssertionCreator

IterableContainsInOrderOnlyAssertionCreator

abstract class IterableContainsInOrderOnlyAssertionCreator<E, T : Iterable<E?>, S> : Creator<T, S>

Represents the base class for in order only assertion creators and provides a corresponding template to fulfill its responsibility.

Parameters

T - The type of the AssertionPlant.subject for which the contains assertion is be build. S - The type of the search criterion.

Constructors

<init>

IterableContainsInOrderOnlyAssertionCreator(searchBehaviour: IterableContainsInOrderOnlySearchBehaviour)

Represents the base class for in any order only assertion creators and provides a corresponding template to fulfill its responsibility.

Functions

createAssertionGroup

fun createAssertionGroup(plant: AssertionPlant<T>, searchCriterion: S, otherSearchCriteria: Array<out S>): AssertionGroup

Creates an AssertionGroup representing the sophisticated contains assertion for the given plant based on the given searchCriterion and possibly otherSearchCriteria (might be empty).

createEntryAssertion

abstract fun createEntryAssertion(iterableAsList: List<E?>, searchCriterion: S, template: ((Boolean) -> Assertion) -> AssertionGroup): AssertionGroup

matches

abstract fun matches(actual: E?, searchCriterion: S): Boolean

Inheritors

IterableContainsInOrderOnlyEntriesAssertionCreator

class IterableContainsInOrderOnlyEntriesAssertionCreator<E : Any, T : Iterable<E?>> : IterableContainsInOrderOnlyAssertionCreator<E, T, AssertionPlant<E>.() -> Unit>

Represents a creator of a sophisticated contains assertions for Iterable where exactly the expected entries have to appear in the specified order and where an entry is identified by holding a group of assertions, created by an assertion creator lambda.

IterableContainsInOrderOnlyObjectsAssertionCreator

class IterableContainsInOrderOnlyObjectsAssertionCreator<E, T : Iterable<E?>> : IterableContainsInOrderOnlyAssertionCreator<E, T, E>

Represents a creator of a sophisticated contains assertions for Iterable where exactly the expected entries have to appear in the specified order and where an entry is identified by an expected object (equality comparison).