/** * The <code>WorkbenchTestable</code> implementation of this * <code>TestableObject</code> method ensures that the workbench * has been set. */ @Override public void testingStarting() { Assert.isNotNull(workbench); oldAutomatedMode = ErrorDialog.AUTOMATED_MODE; ErrorDialog.AUTOMATED_MODE = true; oldIgnoreErrors = SafeRunnable.getIgnoreErrors(); SafeRunnable.setIgnoreErrors(true); }
/** * The <code>WorkbenchTestable</code> implementation of this * <code>TestableObject</code> method flushes the event queue, * then closes the workbench. */ @Override public void testingFinished() { // force events to be processed, and ensure the close is done in the UI thread display.syncExec(() -> Assert.isTrue(workbench.close())); ErrorDialog.AUTOMATED_MODE = oldAutomatedMode; SafeRunnable.setIgnoreErrors(oldIgnoreErrors); } }