public void TestSearchReducer() { // prepare var state = new SearchState(); // act var resultState = SearchReducer.Reduce(state, new SetSearchTextAction("xxx")); // assert Assert.AreEqual(resultState.SearchText, "xxx"); }
public AppStoreContainer() { var reducer = new CompositeReducer <AppState>() .Part(s => s.SearchState, SearchReducer.GetReducer()) .Part(s => s.DiscoverState, DiscoverReducer.GetReducer()) .Part(s => s.AuthenticationState, AuthenticationReducer.GetReducer()) .Part(s => s.FavoriteState, FavouriteReducer.GetReducer()) .Part(s => s.DataState, DataReducer.GetReducer()) .Part(s => s.MovieDetailsState, MovieDetailsReducer.GetReducer()) .Part(s => s.ReviewsState, ReviewsReducer.GetReducer()); Store = new Store <AppState>(reducer); }