org.junit.internal.runners.statements.RunBefores Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of junit Show documentation
Show all versions of junit Show documentation
JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
It is used by the developer who implements unit tests in Java.
package org.junit.internal.runners.statements;
import java.util.List;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.Statement;
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();
}
}