/** * {@inheritDoc} */ public Statement apply(Statement base, Description description) { return new RunRules(base, rulesStartingWithInnerMost, description); } }
public RunRules(Statement base, Iterable<TestRule> rules, Description description) { statement = applyAll(base, rules, description); }
/** * Returns a {@link Statement}: apply all non-static {@link Value} fields * annotated with {@link Rule}. * * @param statement The base statement * @return a RunRules statement if any class-level {@link Rule}s are * found, or the base statement */ private Statement withTestRules(FrameworkMethod method, List<TestRule> testRules, Statement statement) { return testRules.isEmpty() ? statement : new RunRules(statement, testRules, describeChild(method)); }
public RunRules(Statement base, Iterable<TestRule> rules, Description description) { statement = applyAll(base, rules, description); }
/** * Returns a {@link Statement}: apply all * static fields assignable to {@link TestRule} * annotated with {@link ClassRule}. * * @param statement the base statement * @return a RunRules statement if any class-level {@link Rule}s are * found, or the base statement */ private Statement withClassRules(Statement statement) { List<TestRule> classRules = classRules(); return classRules.isEmpty() ? statement : new RunRules(statement, classRules, getDescription()); }
public RunRules(Statement base, Iterable<TestRule> rules, Description description) { statement = applyAll(base, rules, description); }
/** * Returns a {@link Statement}: apply all * static fields assignable to {@link TestRule} * annotated with {@link ClassRule}. * * @param statement the base statement * @return a RunRules statement if any class-level {@link Rule}s are * found, or the base statement */ private Statement withClassRules(Statement statement) { List<TestRule> classRules = classRules(); return classRules.isEmpty() ? statement : new RunRules(statement, classRules, getDescription()); }
public RunRules(Statement base, Iterable<TestRule> rules, Description description) { statement = applyAll(base, rules, description); }
private Statement withRules(final TestDescriptor testCase, Statement statement) { List<TestRule> testRules = getTestClass().getAnnotatedFieldValues(instance, org.junit.Rule.class, TestRule.class); return testRules.isEmpty() ? statement : new RunRules(statement, testRules, describeChild(testCase)); }
public RunRules(Statement base, Iterable<TestRule> rules, Description description) { statement = applyAll(base, rules, description); }
/** * Returns a {@link Statement}: apply all non-static {@link Value} fields * annotated with {@link Rule}. * * @param statement The base statement * @return a RunRules statement if any class-level {@link Rule}s are * found, or the base statement */ private Statement withTestRules(FrameworkMethod method, List<TestRule> testRules, Statement statement) { return testRules.isEmpty() ? statement : new RunRules(statement, testRules, describeChild(method)); }
public RunRules(Statement base, Iterable<TestRule> rules, Description description) { statement = applyAll(base, rules, description); }
/** * Returns a {@link Statement}: apply all * static fields assignable to {@link TestRule} * annotated with {@link ClassRule}. * * @param statement the base statement * @return a RunRules statement if any class-level {@link Rule}s are * found, or the base statement */ private Statement withClassRules(Statement statement) { List<TestRule> classRules = classRules(); return classRules.isEmpty() ? statement : new RunRules(statement, classRules, getDescription()); }
public RunRules(Statement base, Iterable<TestRule> rules, Description description) { statement = applyAll(base, rules, description); }
private Statement withTestRules(final List<TestRule> testRules, final Statement statement, final Description childDescription) { return testRules.isEmpty() ? statement : new RunRules(statement, testRules, childDescription); }
/** * Returns a {@link Statement}: apply all non-static fields annotated with * {@link Rule}. * <p> * This method has a slighty changed signature compared to the original * BlockJUnit4ClassRunner#withTestRules(FrameworkMethod, List, Statement), * replacing the {@link FrameworkMethod} parameter with a * {@link Description}. * * @param description * The description passed to the {@link Rule} * @param statement * The base statement * * @return a RunRules statement if any class-level {@link Rule}s are found, * or the base statement * * @see BlockJUnit4ClassRunner */ public static Statement withTestRules(List<TestRule> testRules, Description description, Statement statement) { return testRules.isEmpty() ? statement : new RunRules(statement, testRules, description); }
/** * Returns a {@link Statement}: apply all non-static fields annotated with {@link Rule}. * * @param statement The base statement * @return a RunRules statement if any class-level {@link Rule}s are found, or the base statement */ protected Statement withTestRules(FrameworkMethod method, List<TestRule> testRules, Statement statement) { return testRules.isEmpty() ? statement : new RunRules(statement, testRules, describeChild(method)); }
private Statement withTestRules(FrameworkMethod method, List<TestRule> testRules, Statement statement) { return testRules.isEmpty() ? statement : new RunRules(statement, testRules, describeChild(method)); }
private synchronized Statement withClassRules(final Statement base, final Description description) { List<TestRule> classRules = getClassRules(); return classRules.isEmpty() ? base : new RunRules(base, classRules, description); }
private Statement applyTestRules(FrameworkMethod method, List<TestRule> testRules, Statement statement) { return testRules.isEmpty() ? statement : new RunRules(statement, testRules, describeChild(method)); }