@Override public void testFailure(Failure failure) throws Exception { super.testFailure(failure); failed = true; }
private void testAborted(RunNotifier notifier, Description description, Throwable e) { notifier.fireTestStarted(description); notifier.fireTestFailure(new Failure(description, e)); notifier.fireTestFinished(description); }
@Override public void run(RunNotifier notifier) { notifier.fireTestAssumptionFailed(new Failure(description, exception)); } }
protected void addFailure(Throwable e) { notifier.fireTestFailure(new Failure(description, e)); } }
/** * Add a listener to be notified as the tests run. * * @param listener the listener to add * @see org.junit.runner.notification.RunListener */ public void addListener(RunListener listener) { notifier.addListener(listener); }
/** * Remove a listener. * * @param listener the listener to remove */ public void removeListener(RunListener listener) { notifier.removeListener(listener); }
@Override protected void notifyListener(RunListener each) throws Exception { each.testRunStarted(description); } }.run();
@Override protected void notifyListener(RunListener each) throws Exception { each.testStarted(description); } }.run();
@Override protected void notifyListener(RunListener each) throws Exception { each.testRunFinished(result); } }.run();
@Override protected void notifyListener(RunListener each) throws Exception { each.testFinished(description); } }.run();
@Override public void testAssumptionFailure(Failure failure) { synchronized (monitor) { listener.testAssumptionFailure(failure); } }
/** * Do not invoke. */ public void fireTestRunStarted(final Description description) { new SafeNotifier() { @Override protected void notifyListener(RunListener each) throws Exception { each.testRunStarted(description); } }.run(); }
@Override protected void notifyListener(RunListener each) throws Exception { each.testSuiteFinished(description); } }.run();
@Override protected void notifyListener(RunListener each) throws Exception { each.testSuiteStarted(description); } }.run();
/** * Calls {@link RunNotifier#fireTestSuiteStarted(Description)}, passing the * {@link Description} that was passed to the {@code EachTestNotifier} constructor. * This should be called when a test suite is about to be started. * @see RunNotifier#fireTestSuiteStarted(Description) * @since 4.13 */ public void fireTestSuiteStarted() { notifier.fireTestSuiteStarted(description); }
private void testAborted(RunNotifier notifier, Description description, Throwable e) { notifier.fireTestStarted(description); notifier.fireTestFailure(new Failure(description, e)); notifier.fireTestFinished(description); }
protected void addFailure(Throwable targetException) { notifier.fireTestFailure(new Failure(description, targetException)); }
public void addFailedAssumption(AssumptionViolatedException e) { notifier.fireTestAssumptionFailed(new Failure(description, e)); }
@Override protected void notifyListener(RunListener listener) throws Exception { for (Failure each : failures) { listener.testFailure(each); } } }.run();
@Override protected void notifyListener(RunListener each) throws Exception { each.testAssumptionFailure(failure); } }.run();