@Test public void taskCallsServerAndIncrementsProgress() { task.start(progress); verify(server, times(1)).markReviewAsRead(review); verify(progress, times(1)).incrementProgress(1); }
@Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 1); boolean success = server.markReviewAsRead(review); progress.incrementProgress(1); return success ? RETURN_SUCCESS : RETURN_FAILURE; }
MarkReviewAsReadTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 1); boolean success = server.markReviewAsRead(review); progress.incrementProgress(1); return success ? RETURN_SUCCESS : RETURN_FAILURE; } }
MarkReviewAsReadTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 1); boolean success = server.markReviewAsRead(review); progress.incrementProgress(1); return success ? RETURN_SUCCESS : RETURN_FAILURE; } MarkReviewAsReadTask(ServerManager server, Review review); }
MarkReviewAsReadTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 1); boolean success = server.markReviewAsRead(review); progress.incrementProgress(1); return success ? RETURN_SUCCESS : RETURN_FAILURE; } MarkReviewAsReadTask(ServerManager server, Review review); @Override int start(TaskStatusMonitor progress); }
MarkReviewAsReadTask extends BackgroundTask { @Override public int start(TaskStatusMonitor progress) { progress.startProgress(this.getDescription(), 1); boolean success = server.markReviewAsRead(review); progress.incrementProgress(1); return success ? RETURN_SUCCESS : RETURN_FAILURE; } MarkReviewAsReadTask(ServerManager server, Review review); @Override int start(TaskStatusMonitor progress);  }