Package org.testng.internal
Class RegexpExpectedExceptionsHolder
java.lang.Object
org.testng.internal.RegexpExpectedExceptionsHolder
- All Implemented Interfaces:
IExpectedExceptionsHolder
A class that contains the expected exceptions and the message regular expression.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate final IAnnotationFinderprivate final ITestNGMethod -
Constructor Summary
ConstructorsConstructorDescriptionRegexpExpectedExceptionsHolder(IAnnotationFinder finder, ITestNGMethod method) -
Method Summary
Modifier and TypeMethodDescriptionprivate StringGet the message in case the Throwable thrown by the test is not matching.booleanmessage / regEx .* other null true false non-null true match
-
Field Details
-
DEFAULT_REGEXP
- See Also:
-
finder
-
method
-
-
Constructor Details
-
RegexpExpectedExceptionsHolder
-
-
Method Details
-
isThrowableMatching
message / regEx .* other null true false non-null true match- Specified by:
isThrowableMatchingin interfaceIExpectedExceptionsHolder- Parameters:
ite- The Throwable thrown by the test- Returns:
- true if the Throwable is matching with the holder logic, false otherwise
-
getWrongExceptionMessage
Description copied from interface:IExpectedExceptionsHolderGet the message in case the Throwable thrown by the test is not matching.- Specified by:
getWrongExceptionMessagein interfaceIExpectedExceptionsHolder- Parameters:
ite- The Throwable thrown by the test- Returns:
- The message which will be displayed as test result
-
getRegExp
-