@Test public void startSession_should_be_indicated_in_recording_state() throws Exception { // given // when sessionManager.startMobileSession(false); // then org.fest.assertions.Assertions.assertThat(sessionManager.state.recording().isRecording()) .isTrue(); }
@Test public void shouldStoreMeasurements() { sessionManager.startMobileSession(false); triggerMeasurement(22); Measurement expected = new Measurement(location.getLatitude(), location.getLongitude(), 22); org.fest.assertions.Assertions.assertThat( sessionManager.getMeasurementStream("LHC").getMeasurements()) .contains(expected); }
@Test public void stopSession_should_changeRecordingState() throws Exception { // given sessionManager.startMobileSession(false); // when sessionManager.stopSession(); // then org.fest.assertions.Assertions.assertThat(sessionManager.state.recording().isRecording()) .isFalse(); }