@Test protected void testGetTimerNotFound() { when(this.timerStorage.getAll()).thenReturn(createTimers(3, true)); this.timerNumber = 4; assertThrows(NoSuchElementException.class, () -> this.tlogic.getTimer(this.timerNumber)); }
public Timer getTimer(int timerNumber) { for (Timer t : this.timerStorage.getAll()) { if (t.getId() == timerNumber) { return t; } } throw new NoSuchElementException(); }
TimerLogic implements RunnableService { public Timer getTimer(int timerNumber) { for (Timer t : this.timerStorage.getAll()) { if (t.getId() == timerNumber) { return t; } } throw new NoSuchElementException(); } }
TimerLogic implements RunnableService { public Timer getTimer(int timerNumber) { for (Timer t : this.timerStorage.getAll()) { if (t.getId() == timerNumber) { return t; } } throw new NoSuchElementException(); }  }
TimerLogic implements RunnableService { public Timer getTimer(int timerNumber) { for (Timer t : this.timerStorage.getAll()) { if (t.getId() == timerNumber) { return t; } } throw new NoSuchElementException(); }  Runnable createTimerRunnable(Timer timer); Timer setTimer(LocalDateTime timerTime); int searchTimerId(); String deleteAllTimers(); String deleteTimer(int timerNumber); String stopRinging(); Timer getTimer(int timerNumber); List<Timer> getAllTimers(); Timer pauseTimer(Timer timer); Timer reactivateTimer(Timer timer); @Override void start(); @Override void stop(); }
TimerLogic implements RunnableService { public Timer getTimer(int timerNumber) { for (Timer t : this.timerStorage.getAll()) { if (t.getId() == timerNumber) { return t; } } throw new NoSuchElementException(); }  Runnable createTimerRunnable(Timer timer); Timer setTimer(LocalDateTime timerTime); int searchTimerId(); String deleteAllTimers(); String deleteTimer(int timerNumber); String stopRinging(); Timer getTimer(int timerNumber); List<Timer> getAllTimers(); Timer pauseTimer(Timer timer); Timer reactivateTimer(Timer timer); @Override void start(); @Override void stop();  }