@Test public void taskReturnsInterruptedIfCancelIsRequestedAtSecondCheckpoint() throws IOException { when(progress.isCancelRequested()).thenReturn(false); Mockito.doAnswer(new Answer() { @Override public Object answer(InvocationOnMock invocation) { when(progress.isCancelRequested()).thenReturn(true); return null; } }).when(uploader).handleSubmissionResponse(); assertEquals(BackgroundTask.RETURN_INTERRUPTED, task.start(progress)); verify(progress, times(1)).incrementProgress(1); }
@Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 2); return run(progress); }
CodeReviewRequestTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 2); return run(progress); } }
CodeReviewRequestTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 2); return run(progress); } CodeReviewRequestTask(ProjectUploader uploader, String path, String requestMessage, ProjectDAO projectDAO,
            IdeUIInvoker invoker); }
CodeReviewRequestTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 2); return run(progress); } CodeReviewRequestTask(ProjectUploader uploader, String path, String requestMessage, ProjectDAO projectDAO,
            IdeUIInvoker invoker); @Override int start(TaskStatusMonitor progress); }
CodeReviewRequestTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 2); return run(progress); } CodeReviewRequestTask(ProjectUploader uploader, String path, String requestMessage, ProjectDAO projectDAO,
            IdeUIInvoker invoker); @Override int start(TaskStatusMonitor progress);  }