コード例 #1
0
  @Test
  public void should_not_crashOnDeletedSensor() throws Exception {
    // given
    SensorEvent event =
        new SensorEvent("CERN", "LHC", "Siggh boson", "SB", "number", "#", 1, 2, 3, 4, 5, 10);
    sessionManager.onEvent(event);

    // when
    sessionManager.deleteSensorStream(event.getSensorName());

    // then (shouldn't crash)
    sessionManager.onEvent(event);
  }
コード例 #2
0
 public void deleteSensorStream(Sensor sensor) {
   String sensorName = sensor.getSensorName();
   deleteSensorStream(sensorName);
 }