Package org.testng.internal
Class ExpectedExceptionsHolder
- java.lang.Object
-
- org.testng.internal.ExpectedExceptionsHolder
-
public class ExpectedExceptionsHolder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<?>[]
expectedClasses
protected IAnnotationFinder
finder
private IExpectedExceptionsHolder
holder
protected ITestNGMethod
method
-
Constructor Summary
Constructors Modifier Constructor Description protected
ExpectedExceptionsHolder(IAnnotationFinder finder, ITestNGMethod method, IExpectedExceptionsHolder holder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.Class<?>[]
findExpectedClasses(IAnnotationFinder finder, ITestNGMethod method)
private java.lang.String
getExpectedExceptionsPluralize()
private boolean
hasNoExpectedClasses()
boolean
isExpectedException(java.lang.Throwable ite)
TestException
noException(ITestNGMethod testMethod)
java.lang.Throwable
wrongException(java.lang.Throwable ite)
-
-
-
Field Detail
-
finder
protected final IAnnotationFinder finder
-
method
protected final ITestNGMethod method
-
expectedClasses
private final java.lang.Class<?>[] expectedClasses
-
holder
private final IExpectedExceptionsHolder holder
-
-
Constructor Detail
-
ExpectedExceptionsHolder
protected ExpectedExceptionsHolder(IAnnotationFinder finder, ITestNGMethod method, IExpectedExceptionsHolder holder)
-
-
Method Detail
-
findExpectedClasses
private static java.lang.Class<?>[] findExpectedClasses(IAnnotationFinder finder, ITestNGMethod method)
-
isExpectedException
public boolean isExpectedException(java.lang.Throwable ite)
- Parameters:
ite
- The exception that was just thrown- Returns:
- true if the exception that was just thrown is part of the expected exceptions
-
wrongException
public java.lang.Throwable wrongException(java.lang.Throwable ite)
-
noException
public TestException noException(ITestNGMethod testMethod)
-
hasNoExpectedClasses
private boolean hasNoExpectedClasses()
-
getExpectedExceptionsPluralize
private java.lang.String getExpectedExceptionsPluralize()
-
-