@Test public void testResetAlarmsNoAlarms() { assertThat(this.acl.resetAlarms(), is("No alarms found")); }
protected String resetAlarms() { int counter = 0; for (Alarm a : this.alarmStorage.getAll()) { counter++; deactivateAlarm(a.getId()); this.alarmStorage.deleteById(a.getPersistentId()); } if (counter == 0) { return "No alarms found"; } return counter + " alarms deleted"; }
AlarmClockLogic implements RunnableService { protected String resetAlarms() { int counter = 0; for (Alarm a : this.alarmStorage.getAll()) { counter++; deactivateAlarm(a.getId()); this.alarmStorage.deleteById(a.getPersistentId()); } if (counter == 0) { return "No alarms found"; } return counter + " alarms deleted"; } }
AlarmClockLogic implements RunnableService { protected String resetAlarms() { int counter = 0; for (Alarm a : this.alarmStorage.getAll()) { counter++; deactivateAlarm(a.getId()); this.alarmStorage.deleteById(a.getPersistentId()); } if (counter == 0) { return "No alarms found"; } return counter + " alarms deleted"; }  }
AlarmClockLogic implements RunnableService { protected String resetAlarms() { int counter = 0; for (Alarm a : this.alarmStorage.getAll()) { counter++; deactivateAlarm(a.getId()); this.alarmStorage.deleteById(a.getPersistentId()); } if (counter == 0) { return "No alarms found"; } return counter + " alarms deleted"; }  String stopRinging(); @Override void start(); @Override void stop(); }
AlarmClockLogic implements RunnableService { protected String resetAlarms() { int counter = 0; for (Alarm a : this.alarmStorage.getAll()) { counter++; deactivateAlarm(a.getId()); this.alarmStorage.deleteById(a.getPersistentId()); } if (counter == 0) { return "No alarms found"; } return counter + " alarms deleted"; }  String stopRinging(); @Override void start(); @Override void stop();  }