iocClientTestCase.setName(method.getName());
JUnitShell.runTest(iocClientTestCase, result);
}
}
catch (GenerationException e) {
notifier.fireTestFailure(new Failure(description, e));
}
catch (InvocationTargetException e) {
notifier.fireTestFailure(new Failure(description, e.getTargetException()));
return;
}
catch (Throwable e) {
notifier.fireTestFailure(new Failure(description, e));
return;
}
notifier.fireTestRunFinished(new Result());
if (!result.wasSuccessful()) {
Failure failure = null;
if (result.failures().hasMoreElements()) {
failure = new Failure(description, result.failures().nextElement().thrownException());
}
else if (result.errors().hasMoreElements()) {
failure = new Failure(description, result.errors().nextElement().thrownException());
}
notifier.fireTestFailure(failure);
}
else {