use of org.eclipse.scout.rt.testing.platform.runner.statement.BeanAnnotationsInitStatement in project scout.rt by eclipse.
the class PlatformTestRunner method withBefores.
@Override
protected Statement withBefores(final FrameworkMethod method, final Object target, final Statement statement) {
final List<FrameworkMethod> befores = getTestClass().getAnnotatedMethods(Before.class);
if (befores.isEmpty()) {
return new BeanAnnotationsInitStatement(statement, target);
}
Statement beforeStatement = new Statement() {
@Override
public void evaluate() throws Throwable {
for (FrameworkMethod each : befores) {
each.invokeExplosively(target);
}
}
};
final Statement interceptedBeforeStatement = interceptBeforeStatement(beforeStatement, getTestClass().getJavaClass(), method.getMethod());
return new BeanAnnotationsInitStatement(new InterceptedBeforeStatement(statement, interceptedBeforeStatement), target);
}
Aggregations