doc / ch.tutteli.atrium.logic.creating.basic.contains.creators.impl / ContainsObjectsAssertionCreator / searchAndCreateAssertion

searchAndCreateAssertion

protected fun searchAndCreateAssertion(multiConsumableContainer: AssertionContainer<TT>, searchCriterion: SC, featureFactory: (Int, Translatable) -> AssertionGroup): AssertionGroup (source)

Overrides ContainsAssertionCreator.searchAndCreateAssertion

Searches for something fulfilling the given searchCriterion in the subject of this expectation associated with the given multiConsumableContainer 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.

Parameters

multiConsumableContainer - Provides the subject of this expectation for which the assertion is created.

searchCriterion - A search criterion.

featureFactory - The feature factory which should be called, passing the number of occurrences (matching the given searchCriterion) including a translation for number of occurrences.

Return
The newly created AssertionGroup.