@Test public void restoreState() { State next = (nextState) -> { }; reduxStore.subscribe(stateSubscriber); reduxStore.restoreState(next); Assert.assertEquals(reduxStore.getState(), next); Mockito.verify(stateSubscriber, Mockito.times(1)).updateState(next); }
@MainThread public void restoreState(@NonNull S nextState) { notifyStateUpdate(nextState); }
ReduxStore implements Store<S, A> { @MainThread public void restoreState(@NonNull S nextState) { notifyStateUpdate(nextState); } }
ReduxStore implements Store<S, A> { @MainThread public void restoreState(@NonNull S nextState) { notifyStateUpdate(nextState); } @SafeVarargs  ReduxStore(@NonNull S initialState, @NonNull Reducer<S, A> reducer, @Nullable Middleware<S, A>... middlewareList); }
ReduxStore implements Store<S, A> { @MainThread public void restoreState(@NonNull S nextState) { notifyStateUpdate(nextState); } @SafeVarargs  ReduxStore(@NonNull S initialState, @NonNull Reducer<S, A> reducer, @Nullable Middleware<S, A>... middlewareList); @AnyThread boolean subscribe(@NonNull StateSubscriber<S> stateSubscriber); @AnyThread boolean unsubscribe(@NonNull StateSubscriber<S> stateSubscriber); @MainThread @Override void dispatch(@NonNull final A action); @NonNull @Override S getState(); @Override void replaceReducer(@NonNull Reducer<S, A> nextReducer); @MainThread void restoreState(@NonNull S nextState); @AnyThread void destroy(); }
ReduxStore implements Store<S, A> { @MainThread public void restoreState(@NonNull S nextState) { notifyStateUpdate(nextState); } @SafeVarargs  ReduxStore(@NonNull S initialState, @NonNull Reducer<S, A> reducer, @Nullable Middleware<S, A>... middlewareList); @AnyThread boolean subscribe(@NonNull StateSubscriber<S> stateSubscriber); @AnyThread boolean unsubscribe(@NonNull StateSubscriber<S> stateSubscriber); @MainThread @Override void dispatch(@NonNull final A action); @NonNull @Override S getState(); @Override void replaceReducer(@NonNull Reducer<S, A> nextReducer); @MainThread void restoreState(@NonNull S nextState); @AnyThread void destroy();  }