@Test public void countScenario_should_increment_total_count() { ScenarioCountDTO counts = new ScenarioCountDTO(); cut.countScenario(counts, passedScenario()); assertThat(counts.getTotal()).isEqualTo(1); }
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);  }