abstract class ContainsObjectsAssertionCreator<T : Any, S, B : ISearchBehaviour, C : IChecker> : ContainsAssertionCreator<T, S, C>
Represents the base class for IContains.ICreators 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 IAssertionPlant.subject.
S
- The type of the search criteria.
B
- The type of the current IContains.ISearchBehaviour.
C
- The type of the checkers in use (typically a sub interface of IContains.IChecker).
ContainsObjectsAssertionCreator(searchBehaviour: B, checkers: List<C>)
Represents the base class for IContains.ICreators which use bare objects as search criteria (matching them
with |
abstract val descriptionContains: ITranslatable
Provides the translation for |
|
abstract val descriptionNumberOfOccurrences: ITranslatable
Provides the translation for |
open fun createAssertionGroupForSearchCriteriaAssertions(assertions: List<IAssertion>): IAssertionGroup
Creates an IAssertionGroup representing the sophisticated |
|
abstract fun search(plant: IAssertionPlant<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: IAssertionPlant<T>, searchCriterion: S, 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. |
class CharSequenceContainsAssertionCreator<T : CharSequence, S : ISearchBehaviour> : ContainsObjectsAssertionCreator<T, Any, S, IChecker>, ICreator<T, Any>
Represents a creator of sophisticated |
|
class IterableContainsInAnyOrderObjectsAssertionCreator<S, T : Iterable<S>> : ContainsObjectsAssertionCreator<T, S, IterableContainsInAnyOrderSearchBehaviour, IChecker>, ICreator<T, S>
Represents a creator of a sophisticated |