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

InAnyOrderOnlyAssertionCreator

abstract class InAnyOrderOnlyAssertionCreator<E, T, in SC> : IterableLikeContains.Creator<T, SC> (source)

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

Parameters

E - The type of the elements of the Iterable the converter is going to create.

T - The type of the subject of this expectation for which the contains assertion is be build.

SC - The type of the search criteria.

Constructors

<init>

InAnyOrderOnlyAssertionCreator(converter: (T) -> Iterable<E>, searchBehaviour: InAnyOrderOnlySearchBehaviour, reportingOptions: InAnyOrderOnlyReportingOptions.() -> Unit)

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

Functions

createAssertionForSearchCriterionAndRemoveMatchFromList

abstract fun createAssertionForSearchCriterionAndRemoveMatchFromList(container: AssertionContainer<*>, searchCriterion: SC, list: MutableList<E?>): Pair<Boolean, Assertion>

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.

Inheritors

InAnyOrderOnlyEntriesAssertionCreator

class InAnyOrderOnlyEntriesAssertionCreator<E : Any, T> : InAnyOrderOnlyAssertionCreator<E?, T, (Expect<E>.() -> Unit)?>

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

InAnyOrderOnlyValuesAssertionCreator

class InAnyOrderOnlyValuesAssertionCreator<E, T> : InAnyOrderOnlyAssertionCreator<E, T, E>

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