@Test public void shouldAllowAccessToAParticularStream() { sessionManager.startMobileSession(false); triggerMeasurement(); MeasurementStream expected = Iterables.getOnlyElement(sessionManager.getMeasurementStreams()); assertThat(sessionManager.getMeasurementStream("LHC") == expected, equalTo(true)); }
@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); }