@Test public void projectUploaderCallsErrorHandlerAndReturnsFalseOnException() throws IOException { Mockito.doThrow(new RuntimeException("Error message here")).when(uploader).zipProjects(); assertEquals(BackgroundTask.RETURN_FAILURE, task.start(progress)); verify(invoker, times(1)).raiseVisibleException( "An error occurred while uploading exercises:\nError message here"); }
@Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 3); return run(progress); }
UploaderTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 3); return run(progress); } }
UploaderTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 3); return run(progress); } UploaderTask(ProjectUploader uploader, String path, ProjectDAO projectDAO, IdeUIInvoker invoker); }
UploaderTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 3); return run(progress); } UploaderTask(ProjectUploader uploader, String path, ProjectDAO projectDAO, IdeUIInvoker invoker); @Override int start(TaskStatusMonitor progress); SubmissionResult getResult(); Project getProject(); }
UploaderTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 3); return run(progress); } UploaderTask(ProjectUploader uploader, String path, ProjectDAO projectDAO, IdeUIInvoker invoker); @Override int start(TaskStatusMonitor progress); SubmissionResult getResult(); Project getProject();  }