* syntax)
*/
protected static ExpectedExceptionsHolder findExpectedExceptions(IAnnotationFinder finder,
Method method) {
ExpectedExceptionsHolder result = null;
IExpectedExceptionsAnnotation expectedExceptions =
(IExpectedExceptionsAnnotation) finder.findAnnotation(method,
IExpectedExceptionsAnnotation.class);
// Old syntax
if (expectedExceptions != null) {
result = new ExpectedExceptionsHolder(expectedExceptions.getValue(), ".*");
}
else {
// New syntax
ITestAnnotation testAnnotation =
(ITestAnnotation) finder.findAnnotation(method, ITestAnnotation.class);