abstract class ContainsObjectsAssertionCreator<T : Any, S, B : SearchBehaviour, C : Checker> : ContainsAssertionCreator<T, S, C>
(source)Represents the base class for Contains.Creators which use bare objects as search criteria (matching them
with ==
).
It provides a template to fulfill the job of creating the sophisticated contains
assertion.
T
- The type of the AssertionPlant.subject.
S
- The type of the search criteria.
B
- The type of the current Contains.SearchBehaviour.
C
- The type of the checkers in use (typically a sub interface of Contains.Checker).
ContainsObjectsAssertionCreator(searchBehaviour: B, checkers: List<C>)
Represents the base class for Contains.Creators which use bare objects as search criteria (matching them
with |
abstract val descriptionContains: Translatable
Provides the translation for |
|
abstract val descriptionNumberOfOccurrences: Translatable
Provides the translation for |
fun createAssertionGroupForSearchCriteriaAssertions(assertions: List<Assertion>): AssertionGroup
Creates an AssertionGroup representing the sophisticated |
|
abstract fun search(plant: AssertionPlant<T>, searchCriterion: S): Int
Searches for something matching the given searchCriterion in the given plant's subject and returns the number of occurrences. |
|
fun searchAndCreateAssertion(plant: AssertionPlant<T>, searchCriterion: S, featureFactory: (Int, Translatable) -> AssertionGroup): AssertionGroup
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 AssertionGroup representing the assertion for a search criteria as a whole. |
fun createAssertionGroup(plant: AssertionPlant<T>, searchCriteria: List<S>): AssertionGroup
Creates an AssertionGroup representing the sophisticated fun createAssertionGroup(plant: AssertionPlant<T>, searchCriterion: S, otherSearchCriteria: Array<out S>): AssertionGroup |
class
Represents a creator of sophisticated |
|
class
Represents a creator of a sophisticated |