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<?>[]expectedClassesprotected IAnnotationFinderfinderprivate IExpectedExceptionsHolderholderprotected ITestNGMethodmethod
-
Constructor Summary
Constructors Modifier Constructor Description protectedExpectedExceptionsHolder(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.StringgetExpectedExceptionsPluralize()private booleanhasNoExpectedClasses()booleanisExpectedException(java.lang.Throwable ite)TestExceptionnoException(ITestNGMethod testMethod)java.lang.ThrowablewrongException(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()
-
-