doc / ch.tutteli.atrium.logic.creating.iterable.contains.creators.impl / InOrderOnlyAssertionCreator

InOrderOnlyAssertionCreator

abstract class InOrderOnlyAssertionCreator<E, T, SC> : InOrderOnlyBaseAssertionCreator<E, T, SC>, InOrderOnlyMatcher<E, SC>

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 subject of the assertion for which the contains assertion is be build.

SC - The type of the search criteria.

Constructors

<init>

InOrderOnlyAssertionCreator(converter: (T) -> Iterable<E>, searchBehaviour: InOrderOnlySearchBehaviour)

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

Functions

createAssertionsAndReturnIndex

open fun Expect<List<E>>.createAssertionsAndReturnIndex(searchCriteria: List<SC>): Int

Inherited Functions

createAssertionGroup

fun createAssertionGroup(container: AssertionContainer<T>, searchCriteria: List<SC>): AssertionGroup

Creates an AssertionGroup representing the sophisticated contains assertion for the subject of the given container, based on the given searchCriteria.

createSingleEntryAssertion

open fun Expect<List<E>>.createSingleEntryAssertion(currentIndex: Int, searchCriterion: SC, translatableIndex: DescriptionIterableAssertion): Unit

entryAssertionCreator

abstract fun entryAssertionCreator(maybeSubject: Option<List<E>>, searchCriterion: SC): (() -> Boolean) -> Assertion

matches

abstract fun matches(actual: E, searchCriterion: SC): Boolean

Inheritors

InOrderOnlyEntriesAssertionCreator

class InOrderOnlyEntriesAssertionCreator<E : Any, T> : InOrderOnlyAssertionCreator<E?, T, (Expect<E>.() -> Unit)?>, InOrderOnlyMatcher<E?, (Expect<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.

InOrderOnlyValuesAssertionCreator

class InOrderOnlyValuesAssertionCreator<E, T> : InOrderOnlyAssertionCreator<E, T, E>, InOrderOnlyMatcher<E, 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).