Top Fields Constructors Methods
org.testng.internal.invokers

public Class ExpectedExceptionsHolder

extends Object
Class Inheritance
Imports
java.util.Arrays, org.testng.IExpectedExceptionsHolder, .ITestNGMethod, .TestException, org.testng.annotations.ITestAnnotation, org.testng.internal.annotations.IAnnotationFinder

Field Summary

Modifier and TypeField and Description
private final Class<?>[]
protected final IAnnotationFinder
private final IExpectedExceptionsHolder
protected final ITestNGMethod

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
private static Class<?>[]
private String
private boolean
public boolean

Returns:

true if the exception that was just thrown is part of the expected exceptions
isExpectedException
(Throwable
The exception that was just thrown
ite
)

public TestException
public Throwable
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

expectedClassesback to summary
private final Class<?>[] expectedClasses
finderback to summary
protected final IAnnotationFinder finder
holderback to summary
private final IExpectedExceptionsHolder holder
methodback to summary
protected final ITestNGMethod method

Constructor Detail

ExpectedExceptionsHolderback to summary
protected ExpectedExceptionsHolder(IAnnotationFinder finder, ITestNGMethod method, IExpectedExceptionsHolder holder)

Method Detail

findExpectedClassesback to summary
private static Class<?>[] findExpectedClasses(IAnnotationFinder finder, ITestNGMethod method)
getExpectedExceptionsPluralizeback to summary
private String getExpectedExceptionsPluralize()
hasNoExpectedClassesback to summary
private boolean hasNoExpectedClasses()
isExpectedExceptionback to summary
public boolean isExpectedException(Throwable ite)
Parameters
ite:Throwable

The exception that was just thrown

Returns:boolean

true if the exception that was just thrown is part of the expected exceptions

noExceptionback to summary
public TestException noException(ITestNGMethod testMethod)
wrongExceptionback to summary
public Throwable wrongException(Throwable ite)