Class MatcherFactory
java.lang.Object
com.codebarrel.automation.api.util.MatcherFactory
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classException thrown if matcher timeout has expired -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontimeoutMatcher(Pattern pattern, CharSequence charSequence) Matcher instance that expires after the default timeout of 30 seconds (from when a matching function is called).timeoutMatcher(Pattern pattern, CharSequence charSequence, Duration timeout) Matcher instance that expires after the given timeout (from when a matching function is called).
-
Constructor Details
-
MatcherFactory
-
-
Method Details
-
timeoutMatcher
Matcher instance that expires after the default timeout of 30 seconds (from when a matching function is called). WARNING: Matcher instance must be discarded afterwards to avoid another timing exception- Parameters:
pattern- Pattern to match againstcharSequence- Text- Returns:
- Matcher that can throw MatcherTimeoutException if accessed after expiring, it must then be discarded (no re-use)
-
timeoutMatcher
public Matcher timeoutMatcher(@Nonnull Pattern pattern, @Nonnull CharSequence charSequence, @Nonnull Duration timeout) Matcher instance that expires after the given timeout (from when a matching function is called). WARNING: Matcher instance must be discarded afterwards to avoid another timing exception- Parameters:
pattern- Pattern to match againstcharSequence- Texttimeout- Expiry timeout duration- Returns:
- Matcher that can throw MatcherTimeoutException if accessed after expiring, it must then be discarded (no re-use)
-