@Test public void the_toString_of_the_original_commands_should_not_be_hidden() { SpyExecutor backingExecutor = new SpyExecutor(); InternalErrorReportingExecutor executor = new InternalErrorReportingExecutor(backingExecutor, suiteListener, new PrintStream(new NullOutputStream())); Runnable originalCommand = () -> { }; executor.execute(originalCommand); assertThat(backingExecutor.lastCommand.toString(), containsString(originalCommand.toString())); }
@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);  }