@Test public void isComplete_should_return_false_if_any_run_is_not_DONE_even_if_it_has_executedScenarios() { Execution execution = new Execution() .withRuns(new HashSet<>(Collections.singletonList( run() .withIncludeInThresholds(Boolean.TRUE) .withStatus(JobStatus.PENDING) .withExecutedScenarios(new HashSet<>(Collections.singletonList(new ExecutedScenario())))))); boolean complete = cut.isComplete(execution); assertThat(complete).isFalse(); }
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);  }