@Test public void dispatch() { Action action = () -> "STUB"; ShadowLooper shadowLooper = Shadows.shadowOf(dispatchProcessor.getDispatchThreadHandler().getLooper()); dispatchProcessor.dispatch(action); shadowLooper.runOneTask(); Mockito.verify(dispatchManager, Mockito.times(1)).handleDispatch(store, action); }
@MainThread public void dispatch(@NonNull A action) { getDispatchThreadHandler().obtainMessage(MESSAGE_CODE_NEW_DISPATCH, action).sendToTarget(); }
DispatchProcessor { @MainThread public void dispatch(@NonNull A action) { getDispatchThreadHandler().obtainMessage(MESSAGE_CODE_NEW_DISPATCH, action).sendToTarget(); } }
DispatchProcessor { @MainThread public void dispatch(@NonNull A action) { getDispatchThreadHandler().obtainMessage(MESSAGE_CODE_NEW_DISPATCH, action).sendToTarget(); } DispatchProcessor(@NonNull Store<S, A> store, @NonNull DispatchManager<S, A> dispatchManager, @NonNull ReduxStore.StateUpdateCallback<S> stateUpdateCallback, @NonNull HandlerProvider handlerProvider); }
DispatchProcessor { @MainThread public void dispatch(@NonNull A action) { getDispatchThreadHandler().obtainMessage(MESSAGE_CODE_NEW_DISPATCH, action).sendToTarget(); } DispatchProcessor(@NonNull Store<S, A> store, @NonNull DispatchManager<S, A> dispatchManager, @NonNull ReduxStore.StateUpdateCallback<S> stateUpdateCallback, @NonNull HandlerProvider handlerProvider); @MainThread void dispatch(@NonNull A action); @WorkerThread void setNewState(@NonNull S state); @SuppressWarnings("unused") void destroy(); }
DispatchProcessor { @MainThread public void dispatch(@NonNull A action) { getDispatchThreadHandler().obtainMessage(MESSAGE_CODE_NEW_DISPATCH, action).sendToTarget(); } DispatchProcessor(@NonNull Store<S, A> store, @NonNull DispatchManager<S, A> dispatchManager, @NonNull ReduxStore.StateUpdateCallback<S> stateUpdateCallback, @NonNull HandlerProvider handlerProvider); @MainThread void dispatch(@NonNull A action); @WorkerThread void setNewState(@NonNull S state); @SuppressWarnings("unused") void destroy();  }