@Test public void testStopWithoutStart() { wifiCapturer.stopSensors(); verifyZeroInteractions(activity); }
@Override public void stopSensors() { if(wifiReceiver == null){ return; } try { activity.unregisterReceiver(wifiReceiver); } catch (IllegalArgumentException e){ Log.e(TAG, "The reciever was not registered or already unregistered: "+e.getMessage()); } }
WifiCapturer implements SensorCollector { @Override public void stopSensors() { if(wifiReceiver == null){ return; } try { activity.unregisterReceiver(wifiReceiver); } catch (IllegalArgumentException e){ Log.e(TAG, "The reciever was not registered or already unregistered: "+e.getMessage()); } } }
WifiCapturer implements SensorCollector { @Override public void stopSensors() { if(wifiReceiver == null){ return; } try { activity.unregisterReceiver(wifiReceiver); } catch (IllegalArgumentException e){ Log.e(TAG, "The reciever was not registered or already unregistered: "+e.getMessage()); } } WifiCapturer(final Activity activity);  WifiCapturer(final Activity activity, final HistogramConsumer consumer, final int maxAge); }
WifiCapturer implements SensorCollector { @Override public void stopSensors() { if(wifiReceiver == null){ return; } try { activity.unregisterReceiver(wifiReceiver); } catch (IllegalArgumentException e){ Log.e(TAG, "The reciever was not registered or already unregistered: "+e.getMessage()); } } WifiCapturer(final Activity activity);  WifiCapturer(final Activity activity, final HistogramConsumer consumer, final int maxAge); void makeFingerprint(final  ProgressDialog progressDialog, final HistogramConsumer consumer); @Override void startSensors(); @Override void stopSensors(); }
WifiCapturer implements SensorCollector { @Override public void stopSensors() { if(wifiReceiver == null){ return; } try { activity.unregisterReceiver(wifiReceiver); } catch (IllegalArgumentException e){ Log.e(TAG, "The reciever was not registered or already unregistered: "+e.getMessage()); } } WifiCapturer(final Activity activity);  WifiCapturer(final Activity activity, final HistogramConsumer consumer, final int maxAge); void makeFingerprint(final  ProgressDialog progressDialog, final HistogramConsumer consumer); @Override void startSensors(); @Override void stopSensors(); static final String TAG; static final int NUMBER_SCANS; }