doc / ch.tutteli.atrium.assertions.iterable.contains.creators / IterableContainsInAnyOrderObjectsAssertionCreator / search

search

protected fun search(subjectProvider: SubjectProvider<T>, searchCriterion: S): Int

Overrides ContainsObjectsAssertionCreator.search

Searches for something matching the given searchCriterion in the given subjectProvider's subject and returns the number of occurrences.

Parameters

subjectProvider - The plant or rather its subject in which we shall look for something matching the given searchCriterion.

searchCriterion - The search criterion used to determine whether something matches or not.

Return
The number of times the searchCriterion matched in the subjectProvider's subject.