@Test public void countScenario_should_increment_failed_count() { ScenarioCountDTO counts = new ScenarioCountDTO() .withFailed(7) .withPassed(2); cut.countScenario(counts, failedScenario()); assertThat(counts.getFailed()).isEqualTo(8); assertThat(counts.getPassed()).isEqualTo(2); }
void countScenario(ScenarioCountDTO counts, ExecutedScenario executedScenario) { counts.setTotal(counts.getTotal() + 1); if (executedScenario.getErrors().isEmpty()) { counts.setPassed(counts.getPassed() + 1); } else { counts.setFailed(counts.getFailed() + 1); } }
QualityService { void countScenario(ScenarioCountDTO counts, ExecutedScenario executedScenario) { counts.setTotal(counts.getTotal() + 1); if (executedScenario.getErrors().isEmpty()) { counts.setPassed(counts.getPassed() + 1); } else { counts.setFailed(counts.getFailed() + 1); } } }
QualityService { void countScenario(ScenarioCountDTO counts, ExecutedScenario executedScenario) { counts.setTotal(counts.getTotal() + 1); if (executedScenario.getErrors().isEmpty()) { counts.setPassed(counts.getPassed() + 1); } else { counts.setFailed(counts.getFailed() + 1); } }  }
QualityService { void countScenario(ScenarioCountDTO counts, ExecutedScenario executedScenario) { counts.setTotal(counts.getTotal() + 1); if (executedScenario.getErrors().isEmpty()) { counts.setPassed(counts.getPassed() + 1); } else { counts.setFailed(counts.getFailed() + 1); } }  void computeQuality(Execution execution); }
QualityService { void countScenario(ScenarioCountDTO counts, ExecutedScenario executedScenario) { counts.setTotal(counts.getTotal() + 1); if (executedScenario.getErrors().isEmpty()) { counts.setPassed(counts.getPassed() + 1); } else { counts.setFailed(counts.getFailed() + 1); } }  void computeQuality(Execution execution);  }