protected fun searchAndCreateAssertion(plant: IAssertionPlant<T>, searchCriterion: IAssertionPlant<E>.() -> Unit, featureFactory: (Int, ITranslatable) -> IAssertionGroup): IAssertionGroup
Searches for something fulfilling the given searchCriterion in the given plant'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 IAssertionGroup representing the assertion for a search criteria as a whole.
plant
- The plant 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 IAssertionGroup.