@Test public void shouldStartSensors() { sessionManager.startSensors(); verify(sessionManager.locationHelper).start(); verify(sessionManager.audioReader).start(); verify(sessionManager.externalSensors).start(); }
@Test public void shouldOnlyStartSensorsOnce() { sessionManager.startSensors(); sessionManager.startSensors(); verify(sessionManager.locationHelper, atMost(1)).start(); verify(sessionManager.audioReader, atMost(1)).start(); }
@Test public void shouldStopSensors() { sessionManager.startSensors(); sessionManager.stopSensors(); verify(sessionManager.audioReader).stop(); verify(sessionManager.locationHelper).stop(); assertThat(sessionManager.isSessionStarted(), equalTo(false)); }
public void startSession(boolean locationLess) { setSession(new Session()); locationHelper.start(); startSensors(); state.recording().startRecording(); notificationHelper.showRecordingNotification(); eventBus.post(new SessionStartedEvent(getSession())); tracker.startTracking(getSession(), locationLess); }