doc / ch.tutteli.atrium.assertions.charsequence.contains / ICharSequenceContains / ISearcher

ISearcher

interface ISearcher<S : ISearchBehaviour>

Represents a searcher which supports the search behaviour S for a given input CharSequence of the search.

Parameters

S - The search behaviour which should be applied to the input CharSequence in which the ISearcher will look for something -- the actual implementation of the search behaviour happens in the ISearcher; ISearchBehaviour only decorates the ITranslatable for reporting.

Functions

search

abstract fun search(searchIn: CharSequence, searchFor: Any): Int

Searches in the given searchIn for the given searchFor, using its toString implementation, and returns the number of occurrences.

Inheritors

CharSequenceContainsIgnoringCaseIndexSearcher

class CharSequenceContainsIgnoringCaseIndexSearcher : ISearcher<CharSequenceContainsIgnoringCaseSearchBehaviour>

Represents an ISearcher which implements the CharSequenceContainsIgnoringCaseSearchBehaviour behaviour and uses CharSequence.indexOf to find expected objects.

CharSequenceContainsIgnoringCaseRegexSearcher

class CharSequenceContainsIgnoringCaseRegexSearcher : ISearcher<CharSequenceContainsIgnoringCaseSearchBehaviour>

Represents an ISearcher which implements the CharSequenceContainsIgnoringCaseSearchBehaviour behaviour and evaluates the matches of a given regular expression on the input of the search.

CharSequenceContainsIndexSearcher

class CharSequenceContainsIndexSearcher : ISearcher<CharSequenceContainsNoOpSearchBehaviour>

Represents an ISearcher which uses CharSequence.indexOf to find expected objects.

CharSequenceContainsRegexSearcher

class CharSequenceContainsRegexSearcher : ISearcher<CharSequenceContainsNoOpSearchBehaviour>

Represents an ISearcher which evaluates the matches of a given regular expression on the input of the search.