org.jnario.runner.internal.RunBefores Maven / Gradle / Ivy
package org.jnario.runner.internal;
import java.util.List;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.Statement;
/*
* Copied from JUnit
*/
public class RunBefores extends Statement {
private final Statement fNext;
private final Object fTarget;
private final List fBefores;
public RunBefores(Statement next, List befores, Object target) {
fNext= next;
fBefores= befores;
fTarget= target;
}
@Override
public void evaluate() throws Throwable {
for (FrameworkMethod before : fBefores)
before.invokeExplosively(fTarget);
fNext.evaluate();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy