@Test public void performNetworkStateChangeWithDisconnectedInfoIgnores() { Dispatcher dispatcher = createDispatcher(serviceMock); NetworkInfo info = mockNetworkInfo(); when(info.isConnectedOrConnecting()).thenReturn(false); dispatcher.performNetworkStateChange(info); verifyZeroInteractions(service); }
void performNetworkStateChange(NetworkInfo info) { if (service instanceof PicassoExecutorService) { ((PicassoExecutorService) service).adjustThreadCount(info); } if (info != null && info.isConnected()) { flushFailedActions(); } }
Dispatcher { void performNetworkStateChange(NetworkInfo info) { if (service instanceof PicassoExecutorService) { ((PicassoExecutorService) service).adjustThreadCount(info); } if (info != null && info.isConnected()) { flushFailedActions(); } } }
Dispatcher { void performNetworkStateChange(NetworkInfo info) { if (service instanceof PicassoExecutorService) { ((PicassoExecutorService) service).adjustThreadCount(info); } if (info != null && info.isConnected()) { flushFailedActions(); } } Dispatcher(Context context, ExecutorService service, Handler mainThreadHandler,
      Downloader downloader, Cache cache, Stats stats); }
Dispatcher { void performNetworkStateChange(NetworkInfo info) { if (service instanceof PicassoExecutorService) { ((PicassoExecutorService) service).adjustThreadCount(info); } if (info != null && info.isConnected()) { flushFailedActions(); } } Dispatcher(Context context, ExecutorService service, Handler mainThreadHandler,
      Downloader downloader, Cache cache, Stats stats);  }
Dispatcher { void performNetworkStateChange(NetworkInfo info) { if (service instanceof PicassoExecutorService) { ((PicassoExecutorService) service).adjustThreadCount(info); } if (info != null && info.isConnected()) { flushFailedActions(); } } Dispatcher(Context context, ExecutorService service, Handler mainThreadHandler,
      Downloader downloader, Cache cache, Stats stats);   }