class IterableContainsInAnyOrderObjectsAssertionCreator<S, T : Iterable<S>> : ContainsObjectsAssertionCreator<T, S, IterableContainsInAnyOrderSearchBehaviour, IterableContains.Checker>, IterableContains.Creator<T, S>
(source)Represents a creator of a sophisticated contains
assertions for Iterable where an expected entry can appear
in any order and is identified by expected objects (equality comparison).
T
- The type of the AssertionPlant.subject for which the contains
assertion is be build.
S
- The type of the elements of the iterable, used as search criterion.
IterableContainsInAnyOrderObjectsAssertionCreator(searchBehaviour: IterableContainsInAnyOrderSearchBehaviour, checkers: List<IterableContains.Checker>)
Represents a creator of a sophisticated |
val descriptionContains: DescriptionIterableAssertion
Provides the translation for |
|
val descriptionNumberOfOccurrences: DescriptionIterableAssertion
Provides the translation for |
fun search(subjectProvider: SubjectProvider<T>, searchCriterion: S): Int
Searches for something matching the given searchCriterion in the given subjectProvider's subject and returns the number of occurrences. |
fun createAssertionGroupForSearchCriteriaAssertions(assertions: List<Assertion>): AssertionGroup
Creates an AssertionGroup representing the sophisticated |
|
fun searchAndCreateAssertion(subjectProvider: SubjectProvider<T>, searchCriterion: S, 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. |