public class RegexpExpectedExceptionsHolder extends java.lang.Object implements IExpectedExceptionsHolder
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_REGEXP |
private IAnnotationFinder |
finder |
private ITestNGMethod |
method |
Constructor and Description |
---|
RegexpExpectedExceptionsHolder(IAnnotationFinder finder,
ITestNGMethod method) |
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
getRegExp() |
java.lang.String |
getWrongExceptionMessage(java.lang.Throwable ite)
Get the message in case the Throwable thrown by the test is not matching.
|
boolean |
isThrowableMatching(java.lang.Throwable ite)
message / regEx .* other null true false non-null true match
|
public static final java.lang.String DEFAULT_REGEXP
private final IAnnotationFinder finder
private final ITestNGMethod method
public RegexpExpectedExceptionsHolder(IAnnotationFinder finder, ITestNGMethod method)
public boolean isThrowableMatching(java.lang.Throwable ite)
isThrowableMatching
in interface IExpectedExceptionsHolder
ite
- The Throwable thrown by the testpublic java.lang.String getWrongExceptionMessage(java.lang.Throwable ite)
IExpectedExceptionsHolder
getWrongExceptionMessage
in interface IExpectedExceptionsHolder
ite
- The Throwable thrown by the testprivate java.lang.String getRegExp()