@Override protected Statement childrenInvoker(RunNotifier notifier) { final Statement features = super.childrenInvoker(notifier); return new Statement() { @Override public void evaluate() throws Throwable { features.evaluate(); bus.send(new TestRunFinished(bus.getTime())); } }; }
/** * Constructs a {@code Statement} to run all of the tests in the test class. Override to add pre-/post-processing. * Here is an outline of the implementation: * <ul> * <li>Call {@link #runChild(Object, RunNotifier)} on each object returned by {@link #getChildren()} (subject to any imposed filter and sort).</li> * <li>ALWAYS run all non-overridden {@code @BeforeClass} methods on this class * and superclasses before the previous step; if any throws an * Exception, stop execution and pass the exception on. * <li>ALWAYS run all non-overridden {@code @AfterClass} methods on this class * and superclasses before any of the previous steps; all AfterClass methods are * always executed: exceptions thrown by previous steps are combined, if * necessary, with exceptions from AfterClass methods into a * {@link MultipleFailureException}. * </ul> * * @return {@code Statement} */ protected Statement classBlock(final RunNotifier notifier) { Statement statement = childrenInvoker(notifier); statement = withBeforeClasses(statement); statement = withAfterClasses(statement); statement = withClassRules(statement); return statement; }
Statement statement = childrenInvoker(notifier); if (!areAllChildrenIgnored()) { statement = withBeforeClasses(statement);
/** * Invoke feature * * @param notifier notifier * @return evaluated Statement */ protected Statement childrenInvoker(RunNotifier notifier) { final Statement features = super.childrenInvoker(notifier); //NOPMD return new Statement() { public void evaluate() { try { features.evaluate(); } catch (Throwable throwable) { throw new RuntimeException("Cannot evaluate statement", throwable); } FluentCucumber.this.runtime.getEventBus() .send(new TestRunFinished( FluentCucumber.this.runtime.getEventBus() .getTime())); } }; }
/** * Constructs a {@code Statement} to run all of the tests in the test class. Override to add pre-/post-processing. * Here is an outline of the implementation: * <ul> * <li>Call {@link #runChild(Object, RunNotifier)} on each object returned by {@link #getChildren()} (subject to any imposed filter and sort).</li> * <li>ALWAYS run all non-overridden {@code @BeforeClass} methods on this class * and superclasses before the previous step; if any throws an * Exception, stop execution and pass the exception on. * <li>ALWAYS run all non-overridden {@code @AfterClass} methods on this class * and superclasses before any of the previous steps; all AfterClass methods are * always executed: exceptions thrown by previous steps are combined, if * necessary, with exceptions from AfterClass methods into a * {@link MultipleFailureException}. * </ul> * * @return {@code Statement} */ protected Statement classBlock(final RunNotifier notifier) { Statement statement = childrenInvoker(notifier); statement = withBeforeClasses(statement); statement = withAfterClasses(statement); statement = withClassRules(statement); return statement; }
@Override protected Statement childrenInvoker(RunNotifier notifier) { final Statement features = super.childrenInvoker(notifier); return new Statement() { @Override public void evaluate() throws Throwable { features.evaluate(); bus.send(new TestRunFinished(bus.getTime())); } }; }
/** * Invoke feature * * @param notifier notifier * @return evaluated Statement */ protected Statement childrenInvoker(RunNotifier notifier) { final Statement features = super.childrenInvoker(notifier); //NOPMD return new Statement() { public void evaluate() { try { features.evaluate(); } catch (Throwable throwable) { throw new RuntimeException("Cannot evaluate statement", throwable); } FluentCucumber.this.runtime.getEventBus() .send(new TestRunFinished( FluentCucumber.this.runtime.getEventBus() .getTime())); } }; }
/** * Constructs a {@code Statement} to run all of the tests in the test class. Override to add pre-/post-processing. * Here is an outline of the implementation: * <ul> * <li>Call {@link #runChild(Object, RunNotifier)} on each object returned by {@link #getChildren()} (subject to any imposed filter and sort).</li> * <li>ALWAYS run all non-overridden {@code @BeforeClass} methods on this class * and superclasses before the previous step; if any throws an * Exception, stop execution and pass the exception on. * <li>ALWAYS run all non-overridden {@code @AfterClass} methods on this class * and superclasses before any of the previous steps; all AfterClass methods are * always executed: exceptions thrown by previous steps are combined, if * necessary, with exceptions from AfterClass methods into a * {@link MultipleFailureException}. * </ul> * * @return {@code Statement} */ protected Statement classBlock(final RunNotifier notifier) { Statement statement = childrenInvoker(notifier); statement = withBeforeClasses(statement); statement = withAfterClasses(statement); statement = withClassRules(statement); return statement; }
/** * Constructs a {@code Statement} to run all of the tests in the test class. Override to add pre-/post-processing. * Here is an outline of the implementation: * <ul> * <li>Call {@link #runChild(Object, RunNotifier)} on each object returned by {@link #getChildren()} (subject to any imposed filter and sort).</li> * <li>ALWAYS run all non-overridden {@code @BeforeClass} methods on this class * and superclasses before the previous step; if any throws an * Exception, stop execution and pass the exception on. * <li>ALWAYS run all non-overridden {@code @AfterClass} methods on this class * and superclasses before any of the previous steps; all AfterClass methods are * always executed: exceptions thrown by previous steps are combined, if * necessary, with exceptions from AfterClass methods into a * {@link MultipleFailureException}. * </ul> * * @return {@code Statement} */ protected Statement classBlock(final RunNotifier notifier) { Statement statement = childrenInvoker(notifier); statement = withBeforeClasses(statement); statement = withAfterClasses(statement); statement = withClassRules(statement); return statement; }
Statement statement = childrenInvoker(notifier); if (!areAllChildrenIgnored()) { statement = withBeforeClasses(statement);
Statement statement = childrenInvoker(notifier); if (!areAllChildrenIgnored()) { statement = withBeforeClasses(statement);