@Test public void reports_internal_errors() { executor.execute(() -> { throw new RuntimeException("the-exception-message"); }); backingExecutor.processEventsUntilIdle(); String expected = String.format("Uncaught exception in thread %s", Thread.currentThread().getName()); verify(suiteListener).onInternalError(eq(expected), notNull(StackTrace.class)); }
@Override public void execute(Runnable command) { backingExecutor.execute(new InternalErrorReporter(command)); }
InternalErrorReportingExecutor extends InternalErrorReporter implements Executor { @Override public void execute(Runnable command) { backingExecutor.execute(new InternalErrorReporter(command)); } }
InternalErrorReportingExecutor extends InternalErrorReporter implements Executor { @Override public void execute(Runnable command) { backingExecutor.execute(new InternalErrorReporter(command)); } InternalErrorReportingExecutor(Executor backingExecutor, SuiteListener listener, PrintStream out); }
InternalErrorReportingExecutor extends InternalErrorReporter implements Executor { @Override public void execute(Runnable command) { backingExecutor.execute(new InternalErrorReporter(command)); } InternalErrorReportingExecutor(Executor backingExecutor, SuiteListener listener, PrintStream out); @Override void execute(Runnable command); }
InternalErrorReportingExecutor extends InternalErrorReporter implements Executor { @Override public void execute(Runnable command) { backingExecutor.execute(new InternalErrorReporter(command)); } InternalErrorReportingExecutor(Executor backingExecutor, SuiteListener listener, PrintStream out); @Override void execute(Runnable command);  }