/** * 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()); }
/** * 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()); }
@Override public void run(final RunNotifier notifier) { EachTestNotifier testNotifier = new EachTestNotifier(notifier, getDescription()); try { Statement statement = classBlock(notifier); statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.fireTestIgnored(); } catch (StoppedByUserException e) { throw e; } catch (Throwable e) { testNotifier.addFailure(e); } }
@Override public void run(final RunNotifier notifier) { EachTestNotifier testNotifier = new EachTestNotifier(notifier, getDescription()); testNotifier.fireTestSuiteStarted(); try { Statement statement = classBlock(notifier); statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.addFailedAssumption(e); } catch (StoppedByUserException e) { throw e; } catch (Throwable e) { testNotifier.addFailure(e); } finally { testNotifier.fireTestSuiteFinished(); } }
@Override public Description getDescription() { return delegate.getDescription(); }
@Override public Description getDescription() { return delegate.getDescription(); }
/** * 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()); }
@Override public void run(final RunNotifier notifier) { EachTestNotifier testNotifier = new EachTestNotifier(notifier, getDescription()); try { Statement statement = classBlock(notifier); statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.fireTestIgnored(); } catch (StoppedByUserException e) { throw e; } catch (Throwable e) { testNotifier.addFailure(e); } }
@Override protected Description describeChild(ParentRunner child) { return child.getDescription(); }
@Override protected Description describeChild(ParentRunner child) { return child.getDescription(); }
@Override protected Description describeChild(ParentRunner child) { return child.getDescription(); }
/** * 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()); }
/** * 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()); }
/** * 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()); }
/** * 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()); }
@Override public Description getDescription() { Description description = Description .createSuiteDescription(super.getDescription().getTestClass()); for (Runner runner : runners) { description.addChild(runner.getDescription()); } return description; }
@Override public void run(final RunNotifier notifier) { EachTestNotifier testNotifier = new EachTestNotifier(notifier, getDescription()); try { Statement statement = classBlock(notifier); statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.fireTestIgnored(); } catch (StoppedByUserException e) { throw e; } catch (Throwable e) { testNotifier.addFailure(e); } }
@Override public void run(final RunNotifier notifier) { EachTestNotifier testNotifier = new EachTestNotifier(notifier, getDescription()); try { Statement statement = classBlock(notifier); statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.addFailedAssumption(e); } catch (StoppedByUserException e) { throw e; } catch (Throwable e) { testNotifier.addFailure(e); } }
@Override public void run(final RunNotifier notifier) { EachTestNotifier testNotifier = new EachTestNotifier(notifier, getDescription()); try { Statement statement = classBlock(notifier); statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.addFailedAssumption(e); } catch (StoppedByUserException e) { throw e; } catch (Throwable e) { testNotifier.addFailure(e); } }
@Override public void run(final RunNotifier notifier) { EachTestNotifier testNotifier = new EachTestNotifier(notifier, getDescription()); try { Statement statement = classBlock(notifier); statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.fireTestIgnored(); } catch (StoppedByUserException e) { throw e; } catch (Throwable e) { testNotifier.addFailure(e); } }