public void EnhanceDispatchTest() { var store = new MyEnhancer <State>(new Store <State>(new RootReducer(), new State(1))); store.Dispatch(new SetIdAction(1)); store.Dispatch(new SetIdAction(2)); Assert.AreEqual(2, store.ActionHistory.Count); Assert.AreEqual(1, (store.ActionHistory[0] as SetIdAction).Id); Assert.AreEqual(2, (store.ActionHistory[1] as SetIdAction).Id); }
public void EnhanceStateTest() { var store = new MyEnhancer <State>(new Store <State>(new RootReducer(), new State(1))); store.Dispatch(new SetIdAction(1)); store.Dispatch(new SetIdAction(2)); var state = store.State; state = store.State; Assert.AreEqual(2, store.StateGet); }