protected fun searchAndCreateAssertion(multiConsumableContainer: AssertionContainer<List<E?>>, searchCriterion: (Expect<E>.() -> Unit)?, featureFactory: (Int, Translatable) -> AssertionGroup): AssertionGroup
Overrides ContainsAssertionCreator.searchAndCreateAssertion
Searches for something fulfilling the given searchCriterion in the subject of the assertion 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.
multiConsumableContainer
- Provides the subject of the assertion 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.