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

IterableContainsInAnyOrderEntriesAssertionCreator

open class IterableContainsInAnyOrderEntriesAssertionCreator<E : Any, T : Iterable<E?>> : ContainsAssertionCreator<T, (AssertionPlant<E>.() -> Unit)?, IterableContains.Checker>, IterableContains.Creator<T, (AssertionPlant<E>.() -> Unit)?>
Deprecated: Please open an issue if you used this class; will be removed with 1.0.0

Represents a creator of a sophisticated contains assertions for Iterable where an expected entry can appear in any order and is identified by holding a group of assertions, created by an assertion creator lambda.

Parameters

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

Constructors

<init>

IterableContainsInAnyOrderEntriesAssertionCreator(searchBehaviour: IterableContainsInAnyOrderSearchBehaviour, checkers: List<IterableContains.Checker>)

Represents a creator of a sophisticated contains assertions for Iterable where expected entries can appear in any order and are identified by holding a group of assertions, created by an assertion creator lambda.

Functions

createAssertionGroupForSearchCriteriaAssertions

fun createAssertionGroupForSearchCriteriaAssertions(assertions: List<Assertion>): AssertionGroup

Creates an AssertionGroup representing the sophisticated contains assertion as a whole based on the given assertions which where created for the search criteria.

searchAndCreateAssertion

fun searchAndCreateAssertion(subjectProvider: SubjectProvider<T>, searchCriterion: (AssertionPlant<E>.() -> Unit)?, featureFactory: (Int, Translatable) -> AssertionGroup): AssertionGroup

Searches for something fulfilling the given searchCriterion in the given subjectProvider's subject and should pass on the number of occurrences to the given featureFactory which creates feature assertions based on the checkers, which in turn can be used to create a resulting AssertionGroup representing the assertion for a search criteria as a whole.

Inherited Functions

createAssertionGroup

fun createAssertionGroup(subjectProvider: SubjectProvider<T>, searchCriteria: List<S>): AssertionGroup

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

fun createAssertionGroup(subjectProvider: SubjectProvider<T>, searchCriterion: S, otherSearchCriteria: Array<out S>): AssertionGroup