use of org.eclipse.scout.rt.testing.platform.runner.statement.BeanAnnotationsCleanupStatement in project scout.rt by eclipse.
the class PlatformTestRunner method withAfters.
@Override
protected Statement withAfters(final FrameworkMethod method, final Object target, final Statement statement) {
final List<FrameworkMethod> afters = getTestClass().getAnnotatedMethods(After.class);
if (afters.isEmpty()) {
return new BeanAnnotationsCleanupStatement(statement);
}
final List<Throwable> errors = new ArrayList<>();
final Statement afterStatement = new RunAftersStatement(afters, target, errors);
final Statement interceptedAfterStatement = interceptAfterStatement(afterStatement, getTestClass().getJavaClass(), method.getMethod());
InterceptedAfterStatement s1 = new InterceptedAfterStatement(statement, interceptedAfterStatement, errors);
return new BeanAnnotationsCleanupStatement(s1);
}
Aggregations