@Test public void isComplete_should_return_true_if_all_runs_to_include_are_DONE() { Execution execution = new Execution() .withRuns(new HashSet<>(Arrays.asList( run() .withIncludeInThresholds(Boolean.TRUE) .withStatus(JobStatus.DONE) .withExecutedScenarios(Collections.singleton(new ExecutedScenario())), run() .withIncludeInThresholds(Boolean.FALSE) .withStatus(JobStatus.PENDING)))); boolean complete = cut.isComplete(execution); assertThat(complete).isTrue(); }
boolean isComplete(Execution execution) { for (Run run : getRunsToIncludeInQuality(execution)) { if (run.getStatus() != JobStatus.DONE || run.getExecutedScenarios().isEmpty()) { return false; } } return true; }
QualityService { boolean isComplete(Execution execution) { for (Run run : getRunsToIncludeInQuality(execution)) { if (run.getStatus() != JobStatus.DONE || run.getExecutedScenarios().isEmpty()) { return false; } } return true; } }
QualityService { boolean isComplete(Execution execution) { for (Run run : getRunsToIncludeInQuality(execution)) { if (run.getStatus() != JobStatus.DONE || run.getExecutedScenarios().isEmpty()) { return false; } } return true; }  }
QualityService { boolean isComplete(Execution execution) { for (Run run : getRunsToIncludeInQuality(execution)) { if (run.getStatus() != JobStatus.DONE || run.getExecutedScenarios().isEmpty()) { return false; } } return true; }  void computeQuality(Execution execution); }
QualityService { boolean isComplete(Execution execution) { for (Run run : getRunsToIncludeInQuality(execution)) { if (run.getStatus() != JobStatus.DONE || run.getExecutedScenarios().isEmpty()) { return false; } } return true; }  void computeQuality(Execution execution);  }