@Test public void handleSubmissionResponseCallsServerGetSubmissionResult() throws URISyntaxException, NoSuchFieldException, IllegalAccessException { URI uri = new URI("http: SubmissionResponse response = new SubmissionResponse(uri, uri); setResponse(response); uploader.handleSubmissionResult(new StopStatus() { @Override public boolean mustStop() { return false; } }); verify(server, times(1)).getSubmissionResult(response.submissionUrl); }
public void handleSubmissionResult(StopStatus stopStatus) { result = server.getSubmissionResult(response.submissionUrl); while (result.getStatus() == SubmissionResult.Status.PROCESSING) { if (!waitForServer(stopStatus)) { result = null; return; } result = server.getSubmissionResult(response.submissionUrl); } }
ProjectUploader { public void handleSubmissionResult(StopStatus stopStatus) { result = server.getSubmissionResult(response.submissionUrl); while (result.getStatus() == SubmissionResult.Status.PROCESSING) { if (!waitForServer(stopStatus)) { result = null; return; } result = server.getSubmissionResult(response.submissionUrl); } } }
ProjectUploader { public void handleSubmissionResult(StopStatus stopStatus) { result = server.getSubmissionResult(response.submissionUrl); while (result.getStatus() == SubmissionResult.Status.PROCESSING) { if (!waitForServer(stopStatus)) { result = null; return; } result = server.getSubmissionResult(response.submissionUrl); } } ProjectUploader(ServerManager server); }
ProjectUploader { public void handleSubmissionResult(StopStatus stopStatus) { result = server.getSubmissionResult(response.submissionUrl); while (result.getStatus() == SubmissionResult.Status.PROCESSING) { if (!waitForServer(stopStatus)) { result = null; return; } result = server.getSubmissionResult(response.submissionUrl); } } ProjectUploader(ServerManager server); void setProject(Project project); void zipProjects(); void handleSubmissionResponse(); void handleSubmissionResult(StopStatus stopStatus); SubmissionResponse getResponse(); SubmissionResult getResult(); Project getProject(); void setAsPaste(String pasteMessage); void setAsRequest(String requestMessage); }
ProjectUploader { public void handleSubmissionResult(StopStatus stopStatus) { result = server.getSubmissionResult(response.submissionUrl); while (result.getStatus() == SubmissionResult.Status.PROCESSING) { if (!waitForServer(stopStatus)) { result = null; return; } result = server.getSubmissionResult(response.submissionUrl); } } ProjectUploader(ServerManager server); void setProject(Project project); void zipProjects(); void handleSubmissionResponse(); void handleSubmissionResult(StopStatus stopStatus); SubmissionResponse getResponse(); SubmissionResult getResult(); Project getProject(); void setAsPaste(String pasteMessage); void setAsRequest(String requestMessage);  }